Call Field.get_default() instead of _get_default()

We can call the inherited public method using `super()` instead of
calling the private method directly.
This commit is contained in:
Maarten ter Huurne 2024-06-11 19:46:51 +02:00
parent 04e152f879
commit db9336031e

View file

@ -34,7 +34,7 @@ class AutoLastModifiedField(AutoCreatedField):
def get_default(self):
"""Return the default value for this field."""
if not hasattr(self, "_default"):
self._default = self._get_default()
self._default = super().get_default()
return self._default
def pre_save(self, model_instance, add):