Skip to content

Commit

Permalink
Merge pull request #44 from zatarus/master
Browse files Browse the repository at this point in the history
Initial value fix for number fields in entity form
  • Loading branch information
Hamdi Sahloul authored Mar 30, 2018
2 parents 2f055a9 + f582eac commit c500175
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eav/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def _build_dynamic_fields(self):
self.fields[attribute.slug] = MappedField(**defaults)

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

def save(self, commit=True):
Expand Down

0 comments on commit c500175

Please sign in to comment.