mirror of https://github.com/CIRCL/AIL-framework
fix: [retro_hunt] api delete paused retro_hunt
parent
48ce4a76a4
commit
1a3ffe70c1
|
@ -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 New Issue