mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-25 02:44:18 +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()
|