mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-10 00:28:22 +00:00
fix: [retro_hunt] api delete paused retro_hunt
This commit is contained in:
parent
48ce4a76a4
commit
1a3ffe70c1
1 changed files with 1 additions and 1 deletions
|
@ -1749,7 +1749,7 @@ def api_delete_retro_hunt_task(task_uuid):
|
|||
if res:
|
||||
return res
|
||||
retro_hunt = RetroHunt(task_uuid)
|
||||
if retro_hunt.is_running() and retro_hunt.get_state() != 'completed':
|
||||
if retro_hunt.is_running() and retro_hunt.get_state() not in ['completed', 'paused']:
|
||||
return {"status": "error", "reason": "You can't delete a running task"}, 400
|
||||
else:
|
||||
return retro_hunt.delete(), 200
|
||||
|
|
Loading…
Reference in a new issue