Skip to content

Commit 9b96376

Browse files
committed
LITE-31232 Fixed access to bulk_relate_cm in cqrs_state
1 parent 6b977d7 commit 9b96376

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dj_cqrs/mixins.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ def _class_serialization(self, using, sync=False):
296296
instance = None
297297
db = using if using is not None else self._state.db
298298

299-
bulk_relate_cm = cqrs_state.bulk_relate_cm
299+
bulk_relate_cm = getattr(cqrs_state, 'bulk_relate_cm', None)
300300
if bulk_relate_cm:
301301
instance = bulk_relate_cm.get_cached_instance(self, db)
302302

dj_cqrs/signals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def post_save(cls, sender, **kwargs):
6565

6666
using = kwargs['using']
6767

68-
bulk_relate_cm = cqrs_state.bulk_relate_cm
68+
bulk_relate_cm = getattr(cqrs_state, 'bulk_relate_cm', None)
6969
if bulk_relate_cm:
7070
bulk_relate_cm.register(instance, using)
7171

0 commit comments

Comments
 (0)