mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-11 09:36:24 +01:00
Only trigger group update for saved users
This commit is contained in:
@@ -50,7 +50,7 @@ def m2m_changed_user_groups(sender, instance, action, *args, **kwargs):
|
|||||||
if auth.smf_username:
|
if auth.smf_username:
|
||||||
update_smf_groups.delay(instance.pk)
|
update_smf_groups.delay(instance.pk)
|
||||||
|
|
||||||
if action == "post_add" or action == "post_remove" or action == "post_clear":
|
if instance.pk and (action == "post_add" or action == "post_remove" or action == "post_clear"):
|
||||||
logger.debug("Waiting for commit to trigger service group update for %s" % instance)
|
logger.debug("Waiting for commit to trigger service group update for %s" % instance)
|
||||||
transaction.on_commit(trigger_service_group_update)
|
transaction.on_commit(trigger_service_group_update)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user