Change delete execution

This commit is contained in:
Patrick Jentsch committed 2019-11-14 09:48:30 +01:00
1 parent 1152417419
commit bab479db20
9 files changed
+111 -148

No files matched your search

+2 -3
View File
@@ -46,9 +46,8 @@ def service(service):
try:
os.makedirs(absolut_dir)
except OSError:
flash('[OSError] Could not add job!')
db.session.delete(job)
db.session.commit()
flash('[ERROR]: Could not add job!')
job.delete()
else:
for file in add_job_form.files.data:
filename = secure_filename(file.filename)