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

@@ -1718,7 +1718,18 @@ class HookQuerySetMixin:
1718
1718
  engine.run(model_class, BEFORE_UPDATE, [parent_obj], ctx=ctx)
1719
1719
 
1720
1720
  # Update the existing parent object
1721
- parent_obj.save(update_fields=kwargs.get("update_fields"))
1721
+ # Filter update_fields to only include fields that exist in the parent model
1722
+ parent_update_fields = kwargs.get("update_fields")
1723
+ if parent_update_fields:
1724
+ # Only include fields that exist in the parent model
1725
+ parent_model_fields = {field.name for field in model_class._meta.local_fields}
1726
+ filtered_update_fields = [
1727
+ field for field in parent_update_fields
1728
+ if field in parent_model_fields
1729
+ ]
1730
+ parent_obj.save(update_fields=filtered_update_fields)
1731
+ else:
1732
+ parent_obj.save()
1722
1733
 
1723
1734
  # Fire AFTER_UPDATE hooks for parent
1724
1735
  if not bypass_hooks:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: django-bulk-hooks
3
- Version: 0.1.278
3
+ Version: 0.1.279
4
4
  Summary: Hook-style hooks for Django bulk operations like bulk_create and bulk_update.
5
5
  Home-page: https://github.com/AugendLimited/django-bulk-hooks
6
6
  License: MIT
@@ -9,9 +9,9 @@ django_bulk_hooks/handler.py,sha256=e_GACTQT-pFF-zL7POeo232MgOikUoCLcxDVInAUiBw,
9
9
  django_bulk_hooks/manager.py,sha256=3jNWL-EkvGScsliNc7mW-ozQCG6HyaEevI1u1BFS4AA,3836
10
10
  django_bulk_hooks/models.py,sha256=WtSfc4GBOG_oOt8n37cVvid0MtFIGze9JYKSixil2y0,4370
11
11
  django_bulk_hooks/priority.py,sha256=HG_2D35nga68lBCZmSXTcplXrjFoRgZFRDOy4ROKonY,376
12
- django_bulk_hooks/queryset.py,sha256=fk3ekLxOut8F_Ox4NHH8buJwBgHFWzkizFypKwbxJJE,97211
12
+ django_bulk_hooks/queryset.py,sha256=scmmfMjXrByx143xvXfQgWjvvbNmNO2DWnC_RKYTgvY,97888
13
13
  django_bulk_hooks/registry.py,sha256=GRUTGVQEO2sdkC9OaZ9Q3U7mM-3Ix83uTyvrlTtpatw,1317
14
- django_bulk_hooks-0.1.278.dist-info/LICENSE,sha256=dguKIcbDGeZD-vXWdLyErPUALYOvtX_fO4Zjhq481uk,1088
15
- django_bulk_hooks-0.1.278.dist-info/METADATA,sha256=YdGIP02B81MI5OHZdqcckaN3gG-7_cEqb4mhMWazQQ8,9103
16
- django_bulk_hooks-0.1.278.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
17
- django_bulk_hooks-0.1.278.dist-info/RECORD,,
14
+ django_bulk_hooks-0.1.279.dist-info/LICENSE,sha256=dguKIcbDGeZD-vXWdLyErPUALYOvtX_fO4Zjhq481uk,1088
15
+ django_bulk_hooks-0.1.279.dist-info/METADATA,sha256=lxY2w4FmpTz3G6gt6XkB2N2uwVwXGWzYrSJHzLK8Da0,9103
16
+ django_bulk_hooks-0.1.279.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
17
+ django_bulk_hooks-0.1.279.dist-info/RECORD,,