Skip to content

Commit 97d8c1e

Browse files
ContactInfo.state now optional, since it was coming empty from some requests.
1 parent 0b82bab commit 97d8c1e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

connect/models/contact_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ContactInfo(BaseModel):
2424
country = None # type: str
2525
""" (str) Country code. """
2626

27-
state = None # type: str
27+
state = None # type: Optional[str]
2828
""" (str) State name. """
2929

3030
city = None # type: str

connect/models/schemas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class ContactInfoSchema(BaseSchema):
7777
contact = fields.Nested(ContactSchema)
7878
country = fields.Str()
7979
postal_code = fields.Str()
80-
state = fields.Str()
80+
state = fields.Str(allow_none=True)
8181

8282
@post_load
8383
def make_object(self, data):

0 commit comments

Comments
 (0)