@@ -114,7 +114,7 @@ def update(self, **fields):
114114 # affected, let's do the same
115115 return len (rows )
116116
117- def on_conflict (self , fields : List [Union [str , Tuple [str ]]], action , index_predicate = None ):
117+ def on_conflict (self , fields : List [Union [str , Tuple [str ]]], action , index_predicate : str = None ):
118118 """Sets the action to take when conflicts arise when attempting
119119 to insert/create a new row.
120120
@@ -223,7 +223,7 @@ def insert_and_get(self, **fields):
223223
224224 return self .model (** model_init_fields )
225225
226- def upsert (self , conflict_target : List , fields : Dict , index_predicate = None ) -> int :
226+ def upsert (self , conflict_target : List , fields : Dict , index_predicate : str = None ) -> int :
227227 """Creates a new record or updates the existing one
228228 with the specified data.
229229
@@ -478,7 +478,7 @@ def on_conflict(self, fields: List[Union[str, Tuple[str]]], action):
478478 """
479479 return self .get_queryset ().on_conflict (fields , action )
480480
481- def upsert (self , conflict_target : List , fields : Dict , index_predicate = None ) -> int :
481+ def upsert (self , conflict_target : List , fields : Dict , index_predicate : str = None ) -> int :
482482 """Creates a new record or updates the existing one
483483 with the specified data.
484484
0 commit comments