Skip to content

Commit

Permalink
Fix persistence bug for when linked class has no store
Browse files Browse the repository at this point in the history
  • Loading branch information
uglyfruitcake committed Nov 27, 2024
1 parent c685ee9 commit 56858f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client_code/persistence.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def __get__(self, instance, objtype=None):
if instance._delta and self._linked_column in instance._delta
else instance._store
)
if store[self._linked_column] is None:
if not store or store[self._linked_column] is None:
return None

return self._cls(store[self._linked_column], *self._args, **self._kwargs)
Expand Down

0 comments on commit 56858f7

Please sign in to comment.