Skip to content

Commit

Permalink
Mark associations as not required
Browse files Browse the repository at this point in the history
  • Loading branch information
subhashb committed Aug 24, 2021
1 parent 6f36d08 commit a2e23fb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/protean/core/field/association.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ def __init__(self, to_cls, via=None, **kwargs):
self.to_cls = to_cls
self.via = via

# Associations cannot be marked `required`
self.required = False

# FIXME Refactor for general use across all types of associations. Currently used only with `HasOne`
self.change = None # Used to store type of change in the association
self.change_old_value = None # Used to preserve the old value that was removed
Expand Down

0 comments on commit a2e23fb

Please sign in to comment.