You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: editing of FlagField via EnumFlagField form field
When attempting to edit an EnumFlagField through a model form (e.g. in django
admin), the form would always be invalid on submit with an invalid_choice error.
This was due to the form attempting to set the model field to a list of enum
members (rather than bitwise-OR'ing the flags together).
This change handles this case by overriding FlagField._coerce_to_value_type and
performing the appropriate bitwise OR there.
0 commit comments