Skip to content

Commit

Permalink
LITE-31232 Fixed access to bulk_relate_cm in cqrs_state
Browse files Browse the repository at this point in the history
  • Loading branch information
maxipavlovic committed Oct 22, 2024
1 parent 6b977d7 commit 9b96376
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dj_cqrs/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def _class_serialization(self, using, sync=False):
instance = None
db = using if using is not None else self._state.db

bulk_relate_cm = cqrs_state.bulk_relate_cm
bulk_relate_cm = getattr(cqrs_state, 'bulk_relate_cm', None)
if bulk_relate_cm:
instance = bulk_relate_cm.get_cached_instance(self, db)

Expand Down
2 changes: 1 addition & 1 deletion dj_cqrs/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def post_save(cls, sender, **kwargs):

using = kwargs['using']

bulk_relate_cm = cqrs_state.bulk_relate_cm
bulk_relate_cm = getattr(cqrs_state, 'bulk_relate_cm', None)
if bulk_relate_cm:
bulk_relate_cm.register(instance, using)

Expand Down

0 comments on commit 9b96376

Please sign in to comment.