fix: fix Sex field when empty and deleting an animal
This commit is contained in:
parent
f2be7d0a53
commit
38dad49bbd
1 changed files with 1 additions and 1 deletions
|
|
@ -216,7 +216,7 @@ class AnimalAssetView(AssetMasterView):
|
|||
f.set_node("animal_type", AnimalTypeRef(self.request))
|
||||
|
||||
# sex
|
||||
if self.viewing and animal.sex is None:
|
||||
if not (self.creating or self.editing) and animal.sex is None:
|
||||
pass # TODO: dict enum widget does not handle null values well
|
||||
else:
|
||||
f.set_node("sex", WuttaDictEnum(self.request, enum.ANIMAL_SEX))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue