mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-31 15:11:27 +00:00
fix: 定时任务,再次执行报错
This commit is contained in:
@@ -262,6 +262,8 @@ class CeleryTaskExecutionViewSet(CommonApiMixin, viewsets.ModelViewSet):
|
||||
msg = _("Task {} not found").format(execution.name)
|
||||
raise JMSException(code='task_not_found_error', detail=msg)
|
||||
try:
|
||||
execution.kwargs.pop('__current_lang', None)
|
||||
execution.kwargs.pop('__current_org_id', None)
|
||||
t = task.delay(*execution.args, **execution.kwargs)
|
||||
except TypeError:
|
||||
msg = _("Task {} args or kwargs error").format(execution.name)
|
||||
|
Reference in New Issue
Block a user