perf: create account add activity log

This commit is contained in:
jiangweidong 2024-12-18 15:44:10 +08:00 committed by Bryan
parent 27fd5d51b9
commit 98cf6f82b7

View File

@ -69,7 +69,7 @@ def create_accounts_activities(account, action='create'):
@receiver(post_save, sender=Account) @receiver(post_save, sender=Account)
def on_account_create_by_template(sender, instance, created=False, **kwargs): def on_account_create_by_template(sender, instance, created=False, **kwargs):
if not created or instance.source != Source.TEMPLATE: if not created:
return return
push_accounts_if_need.delay(accounts=(instance,)) push_accounts_if_need.delay(accounts=(instance,))
create_accounts_activities(instance, action='create') create_accounts_activities(instance, action='create')