perf: change secret (#9048)

Co-authored-by: feng <1304903146@qq.com>
pull/9075/head
fit2bot 2022-11-11 19:15:43 +08:00 committed by GitHub
parent 8b351f49e5
commit b100bbf838
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -36,5 +36,5 @@ class ChangeSecretRecordViewSet(mixins.ListModelMixin, OrgGenericViewSet):
execution = get_object_or_none(AutomationExecution, pk=eid)
if execution:
queryset = queryset.filter(execution=execution)
queryset = queryset.order_by('-date_start')
queryset = queryset.order_by('-date_started')
return queryset

View File

@ -9,7 +9,7 @@ logger = get_logger(__file__)
@shared_task(queue='ansible')
def execute_automation(pid, trigger, tp):
model = AutomationTypes.get_model(tp)
model = AutomationTypes.get_type_model(tp)
with tmp_to_root_org():
instance = get_object_or_none(model, pk=pid)
if not instance: