Skip to content

Commit

Permalink
fix: fail gracefully when loading members with no postcode data
Browse files Browse the repository at this point in the history
  • Loading branch information
joaquimds committed Jun 20, 2024
1 parent 6bc4b7d commit 353fc5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hub/graphql/types/model_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ class GenericData(CommonData):

@strawberry_django.field
def postcode_data(self) -> Optional[PostcodesIOResult]:
return benedict(self.postcode_data)
return benedict(self.postcode_data or {})

@strawberry_django.field
def areas(self, info: Info) -> Optional[Area]:
Expand Down

0 comments on commit 353fc5b

Please sign in to comment.