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 a8be148
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hub/graphql/types/model_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,8 @@ class GenericData(CommonData):

@strawberry_django.field
def postcode_data(self) -> Optional[PostcodesIOResult]:
if not self.postcode_data:
return None
return benedict(self.postcode_data)

@strawberry_django.field
Expand Down

0 comments on commit a8be148

Please sign in to comment.