django-bulk-hooks 0.1.165__py3-none-any.whl → 0.1.167__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/engine.py +7 -0
- django_bulk_hooks/manager.py +6 -1
- {django_bulk_hooks-0.1.165.dist-info → django_bulk_hooks-0.1.167.dist-info}/METADATA +1 -1
- {django_bulk_hooks-0.1.165.dist-info → django_bulk_hooks-0.1.167.dist-info}/RECORD +6 -6
- {django_bulk_hooks-0.1.165.dist-info → django_bulk_hooks-0.1.167.dist-info}/LICENSE +0 -0
- {django_bulk_hooks-0.1.165.dist-info → django_bulk_hooks-0.1.167.dist-info}/WHEEL +0 -0
django_bulk_hooks/engine.py
CHANGED
|
@@ -50,9 +50,16 @@ def run(model_cls, event, new_records, old_records=None, ctx=None):
|
|
|
50
50
|
old_records or [None] * len(new_records),
|
|
51
51
|
strict=True,
|
|
52
52
|
):
|
|
53
|
+
print(f"DEBUG: Checking condition for {handler_cls.__name__}.{method_name}")
|
|
54
|
+
print(f"DEBUG: - new: {type(new)}")
|
|
55
|
+
print(f"DEBUG: - original: {type(original)}")
|
|
56
|
+
print(f"DEBUG: - condition: {condition}")
|
|
53
57
|
if not condition or condition.check(new, original):
|
|
58
|
+
print(f"DEBUG: - condition passed, adding to process list")
|
|
54
59
|
to_process_new.append(new)
|
|
55
60
|
to_process_old.append(original)
|
|
61
|
+
else:
|
|
62
|
+
print(f"DEBUG: - condition failed, skipping")
|
|
56
63
|
|
|
57
64
|
if to_process_new:
|
|
58
65
|
print(f"DEBUG: Executing hook {handler_cls.__name__}.{method_name} with {len(to_process_new)} records")
|
django_bulk_hooks/manager.py
CHANGED
|
@@ -5,7 +5,10 @@ from django_bulk_hooks.queryset import HookQuerySet
|
|
|
5
5
|
|
|
6
6
|
class BulkHookManager(models.Manager):
|
|
7
7
|
def get_queryset(self):
|
|
8
|
-
|
|
8
|
+
qs = HookQuerySet(self.model, using=self._db)
|
|
9
|
+
print(f"DEBUG: BulkHookManager.get_queryset() called for {self.model}")
|
|
10
|
+
print(f"DEBUG: Returning QuerySet type: {type(qs)}")
|
|
11
|
+
return qs
|
|
9
12
|
|
|
10
13
|
def bulk_update(
|
|
11
14
|
self, objs, fields, bypass_hooks=False, bypass_validation=False, **kwargs
|
|
@@ -20,6 +23,8 @@ class BulkHookManager(models.Manager):
|
|
|
20
23
|
print(f"DEBUG: bulk_update method signature: {inspect.signature(method)}")
|
|
21
24
|
print(f"DEBUG: Calling with args: objs={type(objs)}, fields={fields}, bypass_hooks={bypass_hooks}, bypass_validation={bypass_validation}, kwargs={kwargs}")
|
|
22
25
|
print(f"DEBUG: QuerySet class: {type(qs)}")
|
|
26
|
+
print(f"DEBUG: Manager type: {type(self)}")
|
|
27
|
+
print(f"DEBUG: Model: {self.model}")
|
|
23
28
|
|
|
24
29
|
# Check if this is our HookQuerySet or a different QuerySet
|
|
25
30
|
if hasattr(qs, 'bulk_update') and 'bypass_hooks' in inspect.signature(qs.bulk_update).parameters:
|
|
@@ -3,15 +3,15 @@ django_bulk_hooks/conditions.py,sha256=mTvlLcttixbXRkTSNZU5VewkPUavbXRuD2BkJbVWM
|
|
|
3
3
|
django_bulk_hooks/constants.py,sha256=3x1H1fSUUNo0DZONN7GUVDuySZctTR-jtByBHmAIX5w,303
|
|
4
4
|
django_bulk_hooks/context.py,sha256=4IPuOX8TBAYBEMzN0RNHWgE6Giy2ZnR5uRXfd1cpIwk,1051
|
|
5
5
|
django_bulk_hooks/decorators.py,sha256=tckDcxtOzKCbgvS9QydgeIAWTFDEl-ch3_Q--ruEGdQ,4831
|
|
6
|
-
django_bulk_hooks/engine.py,sha256=
|
|
6
|
+
django_bulk_hooks/engine.py,sha256=fqd32vwpNLoph2B6O7BW2eeja8yzUzenLx3Iwj2Mz_U,2964
|
|
7
7
|
django_bulk_hooks/enums.py,sha256=Zo8_tJzuzZ2IKfVc7gZ-0tWPT8q1QhqZbAyoh9ZVJbs,381
|
|
8
8
|
django_bulk_hooks/handler.py,sha256=xZt8iNdYF-ACz-MnKMY0co6scWINU5V5wC1lyDn844k,4854
|
|
9
|
-
django_bulk_hooks/manager.py,sha256=
|
|
9
|
+
django_bulk_hooks/manager.py,sha256=nccIBEWLc9T18A97ZYT1KU4JzGSOvTjBdDOxS4D5bX0,5810
|
|
10
10
|
django_bulk_hooks/models.py,sha256=5PBjBoGlHwAE5b4yaZ5kDjt5UtHfQp6pDrwB2XPs2tk,3850
|
|
11
11
|
django_bulk_hooks/priority.py,sha256=HG_2D35nga68lBCZmSXTcplXrjFoRgZFRDOy4ROKonY,376
|
|
12
12
|
django_bulk_hooks/queryset.py,sha256=pdxnZKJU6eMHT-bxp3s4r8MUwaTXgnIUxgyKvN-1WB8,24723
|
|
13
13
|
django_bulk_hooks/registry.py,sha256=-mQBizJ06nz_tajZBinViKx_uP2Tbc1tIpTEMv7lwKA,705
|
|
14
|
-
django_bulk_hooks-0.1.
|
|
15
|
-
django_bulk_hooks-0.1.
|
|
16
|
-
django_bulk_hooks-0.1.
|
|
17
|
-
django_bulk_hooks-0.1.
|
|
14
|
+
django_bulk_hooks-0.1.167.dist-info/LICENSE,sha256=dguKIcbDGeZD-vXWdLyErPUALYOvtX_fO4Zjhq481uk,1088
|
|
15
|
+
django_bulk_hooks-0.1.167.dist-info/METADATA,sha256=2MGJzmRJUmyLiC0GBYC5ugEMwTFhnbISawDuYKV-I9E,6951
|
|
16
|
+
django_bulk_hooks-0.1.167.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
17
|
+
django_bulk_hooks-0.1.167.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|