Skip to content

Commit f582eac

Browse files
author
zatarus
committed
Initial value fix for number fields in entity form
1 parent e046c54 commit f582eac

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

eav/forms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def _build_dynamic_fields(self):
9494
self.fields[attribute.slug] = MappedField(**defaults)
9595

9696
# fill initial data (if attribute was already defined)
97-
if value and not datatype == attribute.TYPE_ENUM: #enum done above
97+
if not value is None and not datatype == attribute.TYPE_ENUM: #enum done above
9898
self.initial[attribute.slug] = value
9999

100100
def save(self, commit=True):

0 commit comments

Comments
 (0)