django-bulk-hooks 0.2.42__py3-none-any.whl → 0.2.43__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of django-bulk-hooks might be problematic. Click here for more details.
- django_bulk_hooks/operations/mti_handler.py +11 -5
- {django_bulk_hooks-0.2.42.dist-info → django_bulk_hooks-0.2.43.dist-info}/METADATA +1 -1
- {django_bulk_hooks-0.2.42.dist-info → django_bulk_hooks-0.2.43.dist-info}/RECORD +5 -5
- {django_bulk_hooks-0.2.42.dist-info → django_bulk_hooks-0.2.43.dist-info}/LICENSE +0 -0
- {django_bulk_hooks-0.2.42.dist-info → django_bulk_hooks-0.2.43.dist-info}/WHEEL +0 -0
|
@@ -259,11 +259,17 @@ class MTIHandler:
|
|
|
259
259
|
uf for uf in (update_fields or []) if uf in model_fields_by_name
|
|
260
260
|
]
|
|
261
261
|
|
|
262
|
-
#
|
|
263
|
-
#
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
262
|
+
# If no fields to update at this level but we need upsert to prevent
|
|
263
|
+
# unique constraint violations, use one of the unique fields as a dummy
|
|
264
|
+
# update field (updating it to itself is a safe no-op)
|
|
265
|
+
if not filtered_updates and normalized_unique:
|
|
266
|
+
filtered_updates = [normalized_unique[0]]
|
|
267
|
+
|
|
268
|
+
# Only enable upsert if we have fields to update (real or dummy)
|
|
269
|
+
if filtered_updates:
|
|
270
|
+
level_update_conflicts = True
|
|
271
|
+
level_unique_fields = normalized_unique
|
|
272
|
+
level_update_fields = filtered_updates
|
|
267
273
|
|
|
268
274
|
# Create parent level
|
|
269
275
|
parent_level = ParentLevel(
|
|
@@ -15,12 +15,12 @@ django_bulk_hooks/operations/__init__.py,sha256=BtJYjmRhe_sScivLsniDaZmBkm0ZLvcm
|
|
|
15
15
|
django_bulk_hooks/operations/analyzer.py,sha256=dXcgk99Q9Zv7r2PMNIQE9f-hkPW3rGKXnDw28r3C7IE,10782
|
|
16
16
|
django_bulk_hooks/operations/bulk_executor.py,sha256=ARe1Hz4N0BaCJTDaqOn9xQsdbYbs1yOJBtD4Y3VHT5s,21605
|
|
17
17
|
django_bulk_hooks/operations/coordinator.py,sha256=Fx332N_mDpvdicmnOuc_NNsiOpJQ6aI09UbF_Rt6zeU,24196
|
|
18
|
-
django_bulk_hooks/operations/mti_handler.py,sha256=
|
|
18
|
+
django_bulk_hooks/operations/mti_handler.py,sha256=xKEz9hgdFnA6mX5RQ8Pa1MJFluzeJBJ6EqFJxXTyedM,19664
|
|
19
19
|
django_bulk_hooks/operations/mti_plans.py,sha256=YP7LcV9Z8UqNS_x74OswF9_5swqruRTdAu6z-J_R6C0,3377
|
|
20
20
|
django_bulk_hooks/operations/record_classifier.py,sha256=KzUoAhfoqzFVrOabNZAby9Akb54h-fAQZmb8O-fIx_0,6221
|
|
21
21
|
django_bulk_hooks/queryset.py,sha256=aQitlbexcVnmeAdc0jtO3hci39p4QEu4srQPEzozy5s,5546
|
|
22
22
|
django_bulk_hooks/registry.py,sha256=0xm21in-DXlpE12AzCNjbY4q2xePvrZ1orJDSH6sOr4,7862
|
|
23
|
-
django_bulk_hooks-0.2.
|
|
24
|
-
django_bulk_hooks-0.2.
|
|
25
|
-
django_bulk_hooks-0.2.
|
|
26
|
-
django_bulk_hooks-0.2.
|
|
23
|
+
django_bulk_hooks-0.2.43.dist-info/LICENSE,sha256=dguKIcbDGeZD-vXWdLyErPUALYOvtX_fO4Zjhq481uk,1088
|
|
24
|
+
django_bulk_hooks-0.2.43.dist-info/METADATA,sha256=_uKpM59P4qXRrE9bfoortJRn0kNI6iyZy6E0hSFr1dc,9265
|
|
25
|
+
django_bulk_hooks-0.2.43.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
26
|
+
django_bulk_hooks-0.2.43.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|