perf: celery task and add org single (#9698)

Co-authored-by: feng <1304903146@qq.com>
This commit is contained in:
fit2bot
2023-02-22 20:31:20 +08:00
committed by GitHub
parent 8db3543e98
commit b83667bbd5
5 changed files with 7 additions and 6 deletions

View File

@@ -24,7 +24,7 @@ class AccountsTaskCreateAPI(CreateAPIView):
def perform_create(self, serializer):
data = serializer.validated_data
accounts = data.get('accounts', [])
account_ids = [a.id for a in accounts]
account_ids = [str(a.id) for a in accounts]
if data['action'] == 'push':
task = push_accounts_to_assets_task.delay(account_ids)