NullAutoNowDateTimeField.__init__
1 parent 42bdae7 commit fc8bc5aCopy full SHA for fc8bc5a
1 file changed
socnet/core/fields.py
@@ -46,10 +46,7 @@ def create_normalized_str_field(field: Type[TField]) -> Type[TField]:
46
class NullAutoNowDateTimeField(DateTimeField[T_contra, T_co]):
47
@copy_type_hints(DateTimeField.__init__)
48
def __init__(self, **kwargs: Any) -> None:
49
- kwargs["auto_now"] = True
50
- kwargs["auto_now_add"] = False
51
- kwargs["null"] = True
52
- super().__init__(**kwargs)
+ super().__init__(**kwargs, auto_now=True, auto_now_add=False, null=True)
53
54
@override
55
def pre_save(self, model_instance: Model, add: bool) -> Any:
0 commit comments