Skip to content

Commit

Permalink
validate the underlying data type rather than the enum
Browse files Browse the repository at this point in the history
  • Loading branch information
terencehonles committed Aug 31, 2017
1 parent 248afdb commit c19be65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extras_mongoengine/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def validate(self, value):

def _validate(self, value, **kwargs):
return super(EnumField, self)._validate(
self.enum(self.__get_value(value)), **kwargs)
self.__get_value(value), **kwargs)


class IntEnumField(EnumField, IntField):
Expand Down

0 comments on commit c19be65

Please sign in to comment.