django-bulk-hooks 0.1.155__tar.gz → 0.1.157__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.
- {django_bulk_hooks-0.1.155 → django_bulk_hooks-0.1.157}/PKG-INFO +1 -1
- {django_bulk_hooks-0.1.155 → django_bulk_hooks-0.1.157}/django_bulk_hooks/manager.py +7 -18
- {django_bulk_hooks-0.1.155 → django_bulk_hooks-0.1.157}/django_bulk_hooks/queryset.py +1 -2
- {django_bulk_hooks-0.1.155 → django_bulk_hooks-0.1.157}/pyproject.toml +1 -1
- {django_bulk_hooks-0.1.155 → django_bulk_hooks-0.1.157}/LICENSE +0 -0
- {django_bulk_hooks-0.1.155 → django_bulk_hooks-0.1.157}/README.md +0 -0
- {django_bulk_hooks-0.1.155 → django_bulk_hooks-0.1.157}/django_bulk_hooks/__init__.py +0 -0
- {django_bulk_hooks-0.1.155 → django_bulk_hooks-0.1.157}/django_bulk_hooks/conditions.py +0 -0
- {django_bulk_hooks-0.1.155 → django_bulk_hooks-0.1.157}/django_bulk_hooks/constants.py +0 -0
- {django_bulk_hooks-0.1.155 → django_bulk_hooks-0.1.157}/django_bulk_hooks/context.py +0 -0
- {django_bulk_hooks-0.1.155 → django_bulk_hooks-0.1.157}/django_bulk_hooks/decorators.py +0 -0
- {django_bulk_hooks-0.1.155 → django_bulk_hooks-0.1.157}/django_bulk_hooks/engine.py +0 -0
- {django_bulk_hooks-0.1.155 → django_bulk_hooks-0.1.157}/django_bulk_hooks/enums.py +0 -0
- {django_bulk_hooks-0.1.155 → django_bulk_hooks-0.1.157}/django_bulk_hooks/handler.py +0 -0
- {django_bulk_hooks-0.1.155 → django_bulk_hooks-0.1.157}/django_bulk_hooks/models.py +0 -0
- {django_bulk_hooks-0.1.155 → django_bulk_hooks-0.1.157}/django_bulk_hooks/priority.py +0 -0
- {django_bulk_hooks-0.1.155 → django_bulk_hooks-0.1.157}/django_bulk_hooks/registry.py +0 -0
|
@@ -15,16 +15,11 @@ class BulkHookManager(models.Manager):
|
|
|
15
15
|
This follows Django's pattern where Manager methods call QuerySet methods.
|
|
16
16
|
"""
|
|
17
17
|
kwargs = {
|
|
18
|
-
'
|
|
19
|
-
'
|
|
18
|
+
'bypass_hooks': bypass_hooks,
|
|
19
|
+
'bypass_validation': bypass_validation,
|
|
20
20
|
**kwargs
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
if bypass_hooks:
|
|
24
|
-
kwargs['bypass_hooks'] = bypass_hooks
|
|
25
|
-
if bypass_validation:
|
|
26
|
-
kwargs['bypass_validation'] = bypass_validation
|
|
27
|
-
return self.get_queryset().bulk_update(**kwargs)
|
|
22
|
+
return self.get_queryset().bulk_update(objs, fields, **kwargs)
|
|
28
23
|
|
|
29
24
|
def bulk_create(
|
|
30
25
|
self,
|
|
@@ -47,12 +42,9 @@ class BulkHookManager(models.Manager):
|
|
|
47
42
|
'update_conflicts': update_conflicts,
|
|
48
43
|
'update_fields': update_fields,
|
|
49
44
|
'unique_fields': unique_fields,
|
|
45
|
+
'bypass_hooks': bypass_hooks,
|
|
46
|
+
'bypass_validation': bypass_validation,
|
|
50
47
|
}
|
|
51
|
-
# Only include custom args if explicitly set to True
|
|
52
|
-
if bypass_hooks:
|
|
53
|
-
kwargs['bypass_hooks'] = bypass_hooks
|
|
54
|
-
if bypass_validation:
|
|
55
|
-
kwargs['bypass_validation'] = bypass_validation
|
|
56
48
|
return self.get_queryset().bulk_create(
|
|
57
49
|
objs,
|
|
58
50
|
**kwargs
|
|
@@ -68,12 +60,9 @@ class BulkHookManager(models.Manager):
|
|
|
68
60
|
kwargs = {
|
|
69
61
|
'objs': objs,
|
|
70
62
|
'batch_size': batch_size,
|
|
63
|
+
'bypass_hooks': bypass_hooks,
|
|
64
|
+
'bypass_validation': bypass_validation,
|
|
71
65
|
}
|
|
72
|
-
# Only include custom args if explicitly set to True
|
|
73
|
-
if bypass_hooks:
|
|
74
|
-
kwargs['bypass_hooks'] = bypass_hooks
|
|
75
|
-
if bypass_validation:
|
|
76
|
-
kwargs['bypass_validation'] = bypass_validation
|
|
77
66
|
return self.get_queryset().bulk_delete(**kwargs)
|
|
78
67
|
|
|
79
68
|
def update(self, **kwargs):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "django-bulk-hooks"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.157"
|
|
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"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|