Commit dfd510b8 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

VCard4: Use Parameters object

parent 8b43342f
...@@ -525,7 +525,7 @@ class NProperty: ...@@ -525,7 +525,7 @@ class NProperty:
additional: List[str] = field(default_factory=list) additional: List[str] = field(default_factory=list)
prefix: List[str] = field(default_factory=list) prefix: List[str] = field(default_factory=list)
suffix: List[str] = field(default_factory=list) suffix: List[str] = field(default_factory=list)
parameters: List[Parameter] = field(default_factory=list) parameters: Parameters = field(default_factory=Parameters)
@classmethod @classmethod
def from_node(cls, node): def from_node(cls, node):
...@@ -595,7 +595,7 @@ class GenderProperty: ...@@ -595,7 +595,7 @@ class GenderProperty:
name: str = field(default='gender', init=False) name: str = field(default='gender', init=False)
sex: Optional[str] = None sex: Optional[str] = None
identity: Optional[str] = None identity: Optional[str] = None
parameters: List[Parameter] = field(default_factory=list) parameters: Parameters = field(default_factory=Parameters)
@classmethod @classmethod
def from_node(cls, node): def from_node(cls, node):
...@@ -622,7 +622,7 @@ class GenderProperty: ...@@ -622,7 +622,7 @@ class GenderProperty:
if self.sex: if self.sex:
node.addChild('sex', payload=self.sex) node.addChild('sex', payload=self.sex)
if self.identity: if self.identity:
node.addChild('identity', payload=self.sex) node.addChild('identity', payload=self.identity)
return node return node
@property @property
...@@ -643,7 +643,7 @@ class AdrProperty: ...@@ -643,7 +643,7 @@ class AdrProperty:
region: List[str] = field(default_factory=list) region: List[str] = field(default_factory=list)
code: List[str] = field(default_factory=list) code: List[str] = field(default_factory=list)
country: List[str] = field(default_factory=list) country: List[str] = field(default_factory=list)
parameters: List[Parameter] = field(default_factory=list) parameters: Parameters = field(default_factory=Parameters)
@classmethod @classmethod
def from_node(cls, node): def from_node(cls, node):
...@@ -714,7 +714,7 @@ class LangProperty: ...@@ -714,7 +714,7 @@ class LangProperty:
name: str = field(default='lang', init=False) name: str = field(default='lang', init=False)
value: str value: str
parameters: List[Parameter] = field(default_factory=list) parameters: Parameters = field(default_factory=Parameters)
@classmethod @classmethod
def from_node(cls, node): def from_node(cls, node):
...@@ -853,7 +853,7 @@ class ClientpidmapProperty: ...@@ -853,7 +853,7 @@ class ClientpidmapProperty:
name: str = field(default='clientpidmap', init=False) name: str = field(default='clientpidmap', init=False)
sourceid: int sourceid: int
uri: str uri: str
parameters: List[Parameter] = field(default_factory=list) parameters: Parameters = field(default_factory=Parameters)
@classmethod @classmethod
def from_node(cls, node): def from_node(cls, node):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment