File tree Expand file tree Collapse file tree 1 file changed +0
-5
lines changed
Expand file tree Collapse file tree 1 file changed +0
-5
lines changed Original file line number Diff line number Diff line change @@ -3004,9 +3004,6 @@ def build_insert_queries_and_params(
30043004 return a list of ``(sql, parameters)`` 2-tuples which, when executed in
30053005 order, perform the desired INSERT / UPSERT / REPLACE operation.
30063006 """
3007- if (upsert or replace ) and not pk :
3008- raise PrimaryKeyRequired ("UPSERT / REPLACE needs a primary key" )
3009-
30103007 if hash_id_columns and hash_id is None :
30113008 hash_id = "id"
30123009
@@ -3319,8 +3316,6 @@ def insert_all(
33193316 if hash_id_columns and hash_id is None :
33203317 hash_id = "id"
33213318
3322- if upsert and (not pk and not hash_id ):
3323- raise PrimaryKeyRequired ("upsert() requires a pk" )
33243319 assert not (hash_id and pk ), "Use either pk= or hash_id="
33253320 if hash_id_columns and (hash_id is None ):
33263321 hash_id = "id"
You can’t perform that action at this time.
0 commit comments