Skip to content

Commit

Permalink
Fix error message of UrlsafeTokenField's factory arg check
Browse files Browse the repository at this point in the history
  • Loading branch information
mthuurne committed Mar 26, 2024
1 parent bc0f1c3 commit dd47ef4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model_utils/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def __init__(self, editable=False, max_length=128, factory=None, **kwargs):
"""

if factory is not None and not isinstance(factory, Callable):
raise TypeError("'factory' should either be a callable not 'None'")
raise TypeError("'factory' should either be a callable or 'None'")
self._factory = factory

kwargs.pop('default', None) # passing default value has not effect.
Expand Down

0 comments on commit dd47ef4

Please sign in to comment.