django-bulk-hooks 0.2.65__py3-none-any.whl → 0.2.66__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/helpers.py +8 -1
- {django_bulk_hooks-0.2.65.dist-info → django_bulk_hooks-0.2.66.dist-info}/METADATA +1 -1
- {django_bulk_hooks-0.2.65.dist-info → django_bulk_hooks-0.2.66.dist-info}/RECORD +5 -5
- {django_bulk_hooks-0.2.65.dist-info → django_bulk_hooks-0.2.66.dist-info}/LICENSE +0 -0
- {django_bulk_hooks-0.2.65.dist-info → django_bulk_hooks-0.2.66.dist-info}/WHEEL +0 -0
django_bulk_hooks/helpers.py
CHANGED
|
@@ -52,11 +52,18 @@ def build_changeset_for_update(
|
|
|
52
52
|
if old_records_map is None:
|
|
53
53
|
old_records_map = {}
|
|
54
54
|
|
|
55
|
+
# Smart pre-computation logic:
|
|
56
|
+
# - If update_kwargs non-empty and old_records exist: Don't precompute (QuerySet.update case)
|
|
57
|
+
# - If update_kwargs empty and old_records exist: Don't precompute (upsert case)
|
|
58
|
+
# - If update_kwargs empty and no old_records: Precompute as empty (validation case)
|
|
59
|
+
should_precompute = not bool(update_kwargs) and old_records_map is None
|
|
60
|
+
changed_fields = list(update_kwargs.keys()) if should_precompute else None
|
|
61
|
+
|
|
55
62
|
changes = [
|
|
56
63
|
RecordChange(
|
|
57
64
|
new,
|
|
58
65
|
old_records_map.get(new.pk),
|
|
59
|
-
changed_fields=
|
|
66
|
+
changed_fields=changed_fields,
|
|
60
67
|
)
|
|
61
68
|
for new in instances
|
|
62
69
|
]
|
|
@@ -8,7 +8,7 @@ django_bulk_hooks/dispatcher.py,sha256=AQXryGHVdwjFJnyek2PcjZsQM9I6fVA74WLaPJeFP
|
|
|
8
8
|
django_bulk_hooks/enums.py,sha256=Zo8_tJzuzZ2IKfVc7gZ-0tWPT8q1QhqZbAyoh9ZVJbs,381
|
|
9
9
|
django_bulk_hooks/factory.py,sha256=ezrVM5U023KZqOBbJXb6lYUP-pE7WJmi8Olh2Ew-7RA,18085
|
|
10
10
|
django_bulk_hooks/handler.py,sha256=SRCrMzgolrruTkvMnYBFmXLR-ABiw0JiH3605PEdCZM,4207
|
|
11
|
-
django_bulk_hooks/helpers.py,sha256=
|
|
11
|
+
django_bulk_hooks/helpers.py,sha256=3rH9TJkdCPF7Vu--0tDaZzJg9Yxcv7yoSF1K1_-0psQ,8048
|
|
12
12
|
django_bulk_hooks/manager.py,sha256=aDuP87DZLWWbDK2qeA7usl3pxoIjHFIWnQNi_jEq6z0,4446
|
|
13
13
|
django_bulk_hooks/models.py,sha256=TWN_F-SsLGPx9jrkNT9pmJFR5VsZ0Z_QaVOZOmt7bpw,2434
|
|
14
14
|
django_bulk_hooks/operations/__init__.py,sha256=BtJYjmRhe_sScivLsniDaZmBkm0ZLvcmzXFKL7QY2Xg,550
|
|
@@ -21,7 +21,7 @@ django_bulk_hooks/operations/mti_plans.py,sha256=HIRJgogHPpm6MV7nZZ-sZhMLUnozpZP
|
|
|
21
21
|
django_bulk_hooks/operations/record_classifier.py,sha256=It85hJC2K-UsEOLbTR-QBdY5UPV-acQIJ91TSGa7pYo,7053
|
|
22
22
|
django_bulk_hooks/queryset.py,sha256=g_9OtOTC8FXY0hBwYr2FCqQ3mYXbfJTFPLlFV3SHmWQ,5600
|
|
23
23
|
django_bulk_hooks/registry.py,sha256=4HxP1mVK2z4VzvlohbEw2359wM21UJZJYagJJ1komM0,7947
|
|
24
|
-
django_bulk_hooks-0.2.
|
|
25
|
-
django_bulk_hooks-0.2.
|
|
26
|
-
django_bulk_hooks-0.2.
|
|
27
|
-
django_bulk_hooks-0.2.
|
|
24
|
+
django_bulk_hooks-0.2.66.dist-info/LICENSE,sha256=dguKIcbDGeZD-vXWdLyErPUALYOvtX_fO4Zjhq481uk,1088
|
|
25
|
+
django_bulk_hooks-0.2.66.dist-info/METADATA,sha256=SUi-L6kewPDyuGtGMW1PMJoV_DUxHlYAMv_x0kHNT9o,9265
|
|
26
|
+
django_bulk_hooks-0.2.66.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
27
|
+
django_bulk_hooks-0.2.66.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|