Skip to content

Commit

Permalink
fix: Workflow import did not insert AccessToken information
Browse files Browse the repository at this point in the history
  • Loading branch information
shaohuzhang1 committed Dec 24, 2024
1 parent 4550f72 commit 2f95da6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/application/serializers/application_serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,9 @@ def import_(self, with_valid=True):
application_model = self.to_application(application, user_id)
function_lib_model_list = [self.to_function_lib(f, user_id) for f in function_lib_list]
application_model.save()
# 插入认证信息
ApplicationAccessToken(application_id=application_model.id,
access_token=hashlib.md5(str(uuid.uuid1()).encode()).hexdigest()[8:24]).save()
QuerySet(FunctionLib).bulk_create(function_lib_model_list) if len(function_lib_model_list) > 0 else None
return True

Expand Down

0 comments on commit 2f95da6

Please sign in to comment.