From af025f87fc672faaa26c51e1ce51c37395e9e4c3 Mon Sep 17 00:00:00 2001 From: Laurent Date: Thu, 6 Feb 2025 14:01:26 +0100 Subject: [PATCH] when the commit happens --- sync/signals.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sync/signals.py b/sync/signals.py index 7b4a78c..bca2f9e 100644 --- a/sync/signals.py +++ b/sync/signals.py @@ -59,7 +59,7 @@ def synchronization_notifications(sender, instance, created=False, **kwargs): save_model_log_if_possible(instance, signal, created, device_id) # print(f'*** instance._state.db: {instance._state.db}') - notify_impacted_users(instance) + transaction.on_commit(lambda: notify_impacted_users(instance)) def notify_impacted_users(instance): user_ids = set()