Allow deleting jobs in any status including processing
This commit is contained in:
parent
9072ccbfed
commit
e52f450069
2 changed files with 3 additions and 8 deletions
3
app.py
3
app.py
|
|
@ -138,9 +138,6 @@ def delete_job(job_id):
|
||||||
if job is None:
|
if job is None:
|
||||||
flash('Job not found.', 'error')
|
flash('Job not found.', 'error')
|
||||||
return redirect(url_for('index'))
|
return redirect(url_for('index'))
|
||||||
if job['status'] == 'processing':
|
|
||||||
flash('Cannot delete a job that is currently processing.', 'error')
|
|
||||||
return redirect(url_for('index'))
|
|
||||||
|
|
||||||
deleted = store.delete_job(job_id)
|
deleted = store.delete_job(job_id)
|
||||||
if deleted:
|
if deleted:
|
||||||
|
|
|
||||||
|
|
@ -71,11 +71,9 @@
|
||||||
<button type="submit" class="secondary">Retry</button>
|
<button type="submit" class="secondary">Retry</button>
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if job.status != 'processing' %}
|
|
||||||
<form action="{{ url_for('delete_job', job_id=job.id) }}" method="post" onsubmit="return confirm('Delete job #{{ job.id }}?')">
|
<form action="{{ url_for('delete_job', job_id=job.id) }}" method="post" onsubmit="return confirm('Delete job #{{ job.id }}?')">
|
||||||
<button type="submit" class="danger">Delete</button>
|
<button type="submit" class="danger">Delete</button>
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue