django-bulk-hooks 0.1.163__tar.gz → 0.1.164__tar.gz

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.

Files changed (17) hide show
  1. {django_bulk_hooks-0.1.163 → django_bulk_hooks-0.1.164}/PKG-INFO +1 -1
  2. {django_bulk_hooks-0.1.163 → django_bulk_hooks-0.1.164}/django_bulk_hooks/manager.py +6 -0
  3. {django_bulk_hooks-0.1.163 → django_bulk_hooks-0.1.164}/pyproject.toml +1 -1
  4. {django_bulk_hooks-0.1.163 → django_bulk_hooks-0.1.164}/LICENSE +0 -0
  5. {django_bulk_hooks-0.1.163 → django_bulk_hooks-0.1.164}/README.md +0 -0
  6. {django_bulk_hooks-0.1.163 → django_bulk_hooks-0.1.164}/django_bulk_hooks/__init__.py +0 -0
  7. {django_bulk_hooks-0.1.163 → django_bulk_hooks-0.1.164}/django_bulk_hooks/conditions.py +0 -0
  8. {django_bulk_hooks-0.1.163 → django_bulk_hooks-0.1.164}/django_bulk_hooks/constants.py +0 -0
  9. {django_bulk_hooks-0.1.163 → django_bulk_hooks-0.1.164}/django_bulk_hooks/context.py +0 -0
  10. {django_bulk_hooks-0.1.163 → django_bulk_hooks-0.1.164}/django_bulk_hooks/decorators.py +0 -0
  11. {django_bulk_hooks-0.1.163 → django_bulk_hooks-0.1.164}/django_bulk_hooks/engine.py +0 -0
  12. {django_bulk_hooks-0.1.163 → django_bulk_hooks-0.1.164}/django_bulk_hooks/enums.py +0 -0
  13. {django_bulk_hooks-0.1.163 → django_bulk_hooks-0.1.164}/django_bulk_hooks/handler.py +0 -0
  14. {django_bulk_hooks-0.1.163 → django_bulk_hooks-0.1.164}/django_bulk_hooks/models.py +0 -0
  15. {django_bulk_hooks-0.1.163 → django_bulk_hooks-0.1.164}/django_bulk_hooks/priority.py +0 -0
  16. {django_bulk_hooks-0.1.163 → django_bulk_hooks-0.1.164}/django_bulk_hooks/queryset.py +0 -0
  17. {django_bulk_hooks-0.1.163 → django_bulk_hooks-0.1.164}/django_bulk_hooks/registry.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: django-bulk-hooks
3
- Version: 0.1.163
3
+ Version: 0.1.164
4
4
  Summary: Hook-style hooks for Django bulk operations like bulk_create and bulk_update.
5
5
  License: MIT
6
6
  Keywords: django,bulk,hooks
@@ -24,9 +24,11 @@ class BulkHookManager(models.Manager):
24
24
  # Check if this is our HookQuerySet or a different QuerySet
25
25
  if hasattr(qs, 'bulk_update') and 'bypass_hooks' in inspect.signature(qs.bulk_update).parameters:
26
26
  # Our HookQuerySet - pass all parameters
27
+ print(f"DEBUG: Using our HookQuerySet for {self.model}")
27
28
  return qs.bulk_update(objs, fields, bypass_hooks=bypass_hooks, bypass_validation=bypass_validation, **kwargs)
28
29
  else:
29
30
  # Different QuerySet (like queryable_properties) - only pass standard parameters
31
+ print(f"DEBUG: Using different QuerySet ({type(qs)}) for {self.model}, bypassing hooks")
30
32
  django_kwargs = {k: v for k, v in kwargs.items() if k not in ['bypass_hooks', 'bypass_validation']}
31
33
  return qs.bulk_update(objs, fields, **django_kwargs)
32
34
 
@@ -52,6 +54,7 @@ class BulkHookManager(models.Manager):
52
54
  # Check if this is our HookQuerySet or a different QuerySet
53
55
  if hasattr(qs, 'bulk_create') and 'bypass_hooks' in inspect.signature(qs.bulk_create).parameters:
54
56
  # Our HookQuerySet - pass all parameters
57
+ print(f"DEBUG: Using our HookQuerySet for {self.model}")
55
58
  kwargs = {
56
59
  'batch_size': batch_size,
57
60
  'ignore_conflicts': ignore_conflicts,
@@ -62,6 +65,7 @@ class BulkHookManager(models.Manager):
62
65
  return qs.bulk_create(objs, bypass_hooks=bypass_hooks, bypass_validation=bypass_validation, **kwargs)
63
66
  else:
64
67
  # Different QuerySet - only pass standard parameters
68
+ print(f"DEBUG: Using different QuerySet ({type(qs)}) for {self.model}, bypassing hooks")
65
69
  kwargs = {
66
70
  'batch_size': batch_size,
67
71
  'ignore_conflicts': ignore_conflicts,
@@ -85,12 +89,14 @@ class BulkHookManager(models.Manager):
85
89
  # Check if this is our HookQuerySet or a different QuerySet
86
90
  if hasattr(qs, 'bulk_delete') and 'bypass_hooks' in inspect.signature(qs.bulk_delete).parameters:
87
91
  # Our HookQuerySet - pass all parameters
92
+ print(f"DEBUG: Using our HookQuerySet for {self.model}")
88
93
  kwargs = {
89
94
  'batch_size': batch_size,
90
95
  }
91
96
  return qs.bulk_delete(objs, bypass_hooks=bypass_hooks, bypass_validation=bypass_validation, **kwargs)
92
97
  else:
93
98
  # Different QuerySet - only pass standard parameters
99
+ print(f"DEBUG: Using different QuerySet ({type(qs)}) for {self.model}, bypassing hooks")
94
100
  kwargs = {
95
101
  'batch_size': batch_size,
96
102
  }
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "django-bulk-hooks"
3
- version = "0.1.163"
3
+ version = "0.1.164"
4
4
  description = "Hook-style hooks for Django bulk operations like bulk_create and bulk_update."
5
5
  authors = ["Konrad Beck <konrad.beck@merchantcapital.co.za>"]
6
6
  readme = "README.md"