Fix error message of UrlsafeTokenField's factory arg check

This commit is contained in:
Maarten ter Huurne 2023-03-20 18:01:55 +01:00
parent 994d6c1c42
commit e34de65480

View file

@ -347,7 +347,7 @@ class UrlsafeTokenField(models.CharField):
"""
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.