A api fix bug

pull/22/head
雷二猛 2019-12-02 20:50:30 +08:00
parent b28c24e734
commit 86ede36795
1 changed files with 6 additions and 4 deletions

View File

@ -32,6 +32,8 @@ class Schedule(View):
updated_by=request.user,
**form
)
task = Task.objects.filter(pk=form.id).first()
if task and task.is_active:
form.action = 'modify'
form.targets = json.loads(form.targets)
rds_cli = get_redis_connection()