From dd47ef44b538e48b7936c4bf04bb5dfe08361295 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Mon, 20 Mar 2023 18:01:55 +0100 Subject: [PATCH] Fix error message of `UrlsafeTokenField`'s `factory` arg check --- model_utils/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model_utils/fields.py b/model_utils/fields.py index 745ed007..139a3dad 100644 --- a/model_utils/fields.py +++ b/model_utils/fields.py @@ -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.