File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -23,8 +23,7 @@ class SingleArgFunc(Func):
2323 output_field_class : type [DjangoField ]
2424
2525 def __init__ (self , expression : ExpressionArgument ) -> None :
26- super ().__init__ (expression )
27- self .output_field = self .output_field_class ()
26+ super ().__init__ (expression , output_field = self .output_field_class ())
2827
2928
3029# Control Flow Functions
@@ -223,11 +222,9 @@ class LastInsertId(Func):
223222
224223 def __init__ (self , expression : ExpressionArgument | None = None ) -> None :
225224 if expression is not None :
226- super ().__init__ (expression )
225+ super ().__init__ (expression , output_field = IntegerField () )
227226 else :
228- super ().__init__ ()
229-
230- self .output_field = IntegerField ()
227+ super ().__init__ (output_field = IntegerField ())
231228
232229 @classmethod
233230 def get (cls , using : str = DEFAULT_DB_ALIAS ) -> int :
You can’t perform that action at this time.
0 commit comments