fix: [retro_hunt] api delete paused retro_hunt

dev
terrtia 2024-02-15 11:45:55 +01:00
parent 48ce4a76a4
commit 1a3ffe70c1
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
1 changed files with 1 additions and 1 deletions

View File

@ -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