mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
10 lines
249 B
Python
10 lines
249 B
Python
from app.models import Job
|
|
|
|
|
|
def delete_job_(app, job_id):
|
|
with app.app_context():
|
|
job = Job.query.filter_by(id=job_id).first()
|
|
if job is None:
|
|
raise Exception('Job {} not found!'.format(job_id))
|
|
job.delete()
|