Bug when redirecting after deleting a fetch, related to #120

master
Pierre Jaury 8 years ago
parent 9a36cb951d
commit 764b9e209b

@ -51,8 +51,9 @@ def fetch_edit(fetch_id):
@access.owner(models.Fetch, 'fetch_id')
def fetch_delete(fetch_id):
fetch = models.Fetch.query.get(fetch_id) or flask.abort(404)
user = fetch.user
db.session.delete(fetch)
db.session.commit()
flask.flash('Fetch configuration delete')
return flask.redirect(
flask.url_for('.fetch_list', user_email=fetch.user.email))
flask.url_for('.fetch_list', user_email=user.email))

Loading…
Cancel
Save