django-bulk-hooks 0.1.50__py3-none-any.whl → 0.1.52__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.

@@ -37,7 +37,10 @@ class BulkLifecycleManager(models.Manager):
37
37
 
38
38
  for i in range(0, len(objs), self.CHUNK_SIZE):
39
39
  chunk = objs[i : i + self.CHUNK_SIZE]
40
- super().bulk_update(chunk, fields, batch_size=batch_size)
40
+ # Call the base implementation to avoid re-triggering this method
41
+ super(models.Manager, self).bulk_update(
42
+ chunk, fields, batch_size=batch_size
43
+ )
41
44
 
42
45
  if not bypass_hooks:
43
46
  engine.run(model_cls, AFTER_UPDATE, objs, originals, ctx=ctx)
@@ -64,7 +67,7 @@ class BulkLifecycleManager(models.Manager):
64
67
  for i in range(0, len(objs), self.CHUNK_SIZE):
65
68
  chunk = objs[i : i + self.CHUNK_SIZE]
66
69
  result.extend(
67
- super().bulk_create(
70
+ super(models.Manager, self).bulk_create(
68
71
  chunk, batch_size=batch_size, ignore_conflicts=ignore_conflicts
69
72
  )
70
73
  )
@@ -1,4 +1,5 @@
1
1
  from django.db import models, transaction
2
+ from django.db.models.manager import BaseManager
2
3
 
3
4
 
4
5
  class LifecycleQuerySet(models.QuerySet):
@@ -19,7 +20,8 @@ class LifecycleQuerySet(models.QuerySet):
19
20
  for field, value in kwargs.items():
20
21
  setattr(obj, field, value)
21
22
 
22
- self.model.objects.bulk_update(
23
+ BaseManager.bulk_update(
24
+ self.model._base_manager,
23
25
  instances,
24
26
  fields=list(kwargs.keys()),
25
27
  )
@@ -1,8 +1,7 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: django-bulk-hooks
3
- Version: 0.1.50
3
+ Version: 0.1.52
4
4
  Summary: Lifecycle-style hooks for Django bulk operations like bulk_create and bulk_update.
5
- Home-page: https://github.com/AugendLimited/django-bulk-hooks
6
5
  License: MIT
7
6
  Keywords: django,bulk,hooks
8
7
  Author: Konrad Beck
@@ -14,6 +13,7 @@ Classifier: Programming Language :: Python :: 3.11
14
13
  Classifier: Programming Language :: Python :: 3.12
15
14
  Classifier: Programming Language :: Python :: 3.13
16
15
  Requires-Dist: Django (>=4.0)
16
+ Project-URL: Homepage, https://github.com/AugendLimited/django-bulk-hooks
17
17
  Project-URL: Repository, https://github.com/AugendLimited/django-bulk-hooks
18
18
  Description-Content-Type: text/markdown
19
19
 
@@ -6,12 +6,12 @@ django_bulk_hooks/decorators.py,sha256=wbT9lbpKZqDbG5vPvtTC6MHYWvjLaVccCwFM9U2nH
6
6
  django_bulk_hooks/engine.py,sha256=l7BzU3lfYhZHZazks8FgHhZB4iLVKuzmcnVcyEQkGpQ,1978
7
7
  django_bulk_hooks/enums.py,sha256=Zo8_tJzuzZ2IKfVc7gZ-0tWPT8q1QhqZbAyoh9ZVJbs,381
8
8
  django_bulk_hooks/handler.py,sha256=X6VIBvW84Ni7Y2MWAN1l7lcomSmS7pQ3W9HF_Y0k9ZA,8294
9
- django_bulk_hooks/manager.py,sha256=QX3uN8GUf56p_Tpu_mojGnZl7Rl6hPRqynUNfb2H3Gw,4120
9
+ django_bulk_hooks/manager.py,sha256=jsTgbjmRe5SeakVJxV8wYxqH6f3fRX5zm3q0Wy-M9Nc,4271
10
10
  django_bulk_hooks/models.py,sha256=_cqIVHKhXb1EOnXxhsuJUlLnPjTRM_sCP5OKbq4q-I8,542
11
11
  django_bulk_hooks/priority.py,sha256=HG_2D35nga68lBCZmSXTcplXrjFoRgZFRDOy4ROKonY,376
12
- django_bulk_hooks/queryset.py,sha256=wrK--iZBsBNuf25HpaaZE9__EN9y6KlVmfXqioS8SmY,681
12
+ django_bulk_hooks/queryset.py,sha256=cS2M5Ly9MBvk5cc3bKSUsPx8Me2nyuji7S5phob3PE4,763
13
13
  django_bulk_hooks/registry.py,sha256=yeTi0IhodL61J86ohb5OyITufE28T3ecMbt6RWvkzTs,585
14
- django_bulk_hooks-0.1.50.dist-info/LICENSE,sha256=dguKIcbDGeZD-vXWdLyErPUALYOvtX_fO4Zjhq481uk,1088
15
- django_bulk_hooks-0.1.50.dist-info/METADATA,sha256=_ZCd2xtNJXtXNiXxvo71qmy9N3ezqSKbDCAkAzz-hFQ,3101
16
- django_bulk_hooks-0.1.50.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
17
- django_bulk_hooks-0.1.50.dist-info/RECORD,,
14
+ django_bulk_hooks-0.1.52.dist-info/LICENSE,sha256=dguKIcbDGeZD-vXWdLyErPUALYOvtX_fO4Zjhq481uk,1088
15
+ django_bulk_hooks-0.1.52.dist-info/METADATA,sha256=uiXubAlmZhneP5_ZHNKi9rAyXWhVBUFeXcVaw21epao,3113
16
+ django_bulk_hooks-0.1.52.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
17
+ django_bulk_hooks-0.1.52.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.9.1
2
+ Generator: poetry-core 2.1.3
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any