mirror of
https://github.com/Hopiu/django-model-utils.git
synced 2026-04-19 02:40:59 +00:00
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:
parent
04e152f879
commit
db9336031e
1 changed files with 1 additions and 1 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue