django-bulk-hooks 0.1.105__py3-none-any.whl → 0.1.107__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/manager.py +15 -7
- {django_bulk_hooks-0.1.105.dist-info → django_bulk_hooks-0.1.107.dist-info}/METADATA +1 -1
- {django_bulk_hooks-0.1.105.dist-info → django_bulk_hooks-0.1.107.dist-info}/RECORD +5 -5
- {django_bulk_hooks-0.1.105.dist-info → django_bulk_hooks-0.1.107.dist-info}/LICENSE +0 -0
- {django_bulk_hooks-0.1.105.dist-info → django_bulk_hooks-0.1.107.dist-info}/WHEEL +0 -0
django_bulk_hooks/manager.py
CHANGED
|
@@ -26,10 +26,15 @@ class BulkHookManager(models.Manager):
|
|
|
26
26
|
"""
|
|
27
27
|
Check if this model uses multi-table inheritance.
|
|
28
28
|
"""
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
if not model_cls._meta.parents:
|
|
30
|
+
return False
|
|
31
|
+
|
|
32
|
+
# Check if any parent is not abstract
|
|
33
|
+
for parent_model in model_cls._meta.parents.keys():
|
|
34
|
+
if not parent_model._meta.abstract:
|
|
35
|
+
return True
|
|
36
|
+
|
|
37
|
+
return False
|
|
33
38
|
|
|
34
39
|
def _get_base_model(self, model_cls):
|
|
35
40
|
"""
|
|
@@ -37,10 +42,13 @@ class BulkHookManager(models.Manager):
|
|
|
37
42
|
"""
|
|
38
43
|
base_model = model_cls
|
|
39
44
|
while base_model._meta.parents:
|
|
40
|
-
parent
|
|
41
|
-
|
|
42
|
-
|
|
45
|
+
# Get the first non-abstract parent model
|
|
46
|
+
for parent_model in base_model._meta.parents.keys():
|
|
47
|
+
if not parent_model._meta.abstract:
|
|
48
|
+
base_model = parent_model
|
|
49
|
+
break
|
|
43
50
|
else:
|
|
51
|
+
# No non-abstract parents found, break the loop
|
|
44
52
|
break
|
|
45
53
|
return base_model
|
|
46
54
|
|
|
@@ -6,12 +6,12 @@ django_bulk_hooks/decorators.py,sha256=tckDcxtOzKCbgvS9QydgeIAWTFDEl-ch3_Q--ruEG
|
|
|
6
6
|
django_bulk_hooks/engine.py,sha256=3HbgV12JRYIy9IlygHPxZiHnFXj7EwzLyTuJNQeVIoI,1402
|
|
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=aAEKZ35vI7x8fwUuWc1Lh8jWt-3Zh_xSlsptC92WoC8,13445
|
|
10
10
|
django_bulk_hooks/models.py,sha256=7RG7GrOdHXFjGVPV4FPRZVNMIHHW-hMCi6hn9LH_hVI,3331
|
|
11
11
|
django_bulk_hooks/priority.py,sha256=HG_2D35nga68lBCZmSXTcplXrjFoRgZFRDOy4ROKonY,376
|
|
12
12
|
django_bulk_hooks/queryset.py,sha256=iet4z-9SKhnresA4FBQbxx9rdYnoaOWbw9LUlGftlP0,1466
|
|
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.107.dist-info/LICENSE,sha256=dguKIcbDGeZD-vXWdLyErPUALYOvtX_fO4Zjhq481uk,1088
|
|
15
|
+
django_bulk_hooks-0.1.107.dist-info/METADATA,sha256=ynCrsNpCDsocsxJy-7mn20G3CR8OOyMJEbfXYWjRDOk,6951
|
|
16
|
+
django_bulk_hooks-0.1.107.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
17
|
+
django_bulk_hooks-0.1.107.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|