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.

@@ -26,10 +26,15 @@ class BulkHookManager(models.Manager):
26
26
  """
27
27
  Check if this model uses multi-table inheritance.
28
28
  """
29
- return (
30
- model_cls._meta.parents and
31
- not all(parent._meta.abstract for parent in model_cls._meta.parents.values())
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 = next(iter(base_model._meta.parents.values()))
41
- if not parent._meta.abstract:
42
- base_model = parent
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
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: django-bulk-hooks
3
- Version: 0.1.105
3
+ Version: 0.1.107
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
@@ -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=Q9Oss6kWCgyL-08t3XYplLSQSLILMAX7Qv9eg7-VgKA,13147
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.105.dist-info/LICENSE,sha256=dguKIcbDGeZD-vXWdLyErPUALYOvtX_fO4Zjhq481uk,1088
15
- django_bulk_hooks-0.1.105.dist-info/METADATA,sha256=PVNvKCg4CciKQTGbe7p4L38tsF9kuum22H7zaPu8oNs,6951
16
- django_bulk_hooks-0.1.105.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
17
- django_bulk_hooks-0.1.105.dist-info/RECORD,,
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,,