Skip to content

Commit

Permalink
Merge pull request #20 from reinoudvansanten/master
Browse files Browse the repository at this point in the history
Disabled validation for enum
  • Loading branch information
Hamdi Sahloul committed Mar 30, 2018
2 parents c500175 + d321d4f commit e3ba3ba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions eav/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,12 @@ def validate_enum(value):
Raises ``ValidationError`` unless *value* is a saved
:class:`~eav.models.EnumValue` model instance.
'''
pass
"""
# This never passes, value is a str
from .models import EnumValue
if not isinstance(value, EnumValue):
raise ValidationError(_(u"Must be an EnumValue model object instance"))
if not value.pk:
raise ValidationError(_(u"EnumValue has not been saved yet"))
"""

0 comments on commit e3ba3ba

Please sign in to comment.