ci: add flake8
This commit is contained in:
parent
014596d271
commit
dd501a6e4e
32 changed files with 170 additions and 171 deletions
|
@ -48,7 +48,7 @@ def webhook_new() -> ResponseReturnValue:
|
|||
db.session.commit()
|
||||
flash(f"Created new webhook {webhook.url}.", "success")
|
||||
return redirect(url_for("portal.webhook.webhook_edit", webhook_id=webhook.id))
|
||||
except exc.SQLAlchemyError as e:
|
||||
except exc.SQLAlchemyError:
|
||||
flash("Failed to create new webhook.", "danger")
|
||||
return redirect(url_for("portal.webhook.webhook_list"))
|
||||
return render_template("new.html.j2", section="webhook", form=form)
|
||||
|
@ -95,7 +95,7 @@ def webhook_list() -> ResponseReturnValue:
|
|||
|
||||
@bp.route("/destroy/<webhook_id>", methods=['GET', 'POST'])
|
||||
def webhook_destroy(webhook_id: int) -> ResponseReturnValue:
|
||||
webhook: Optional[Webhook] = Webhook.query.filter(Webhook.id == webhook_id, Webhook.destroyed == None).first()
|
||||
webhook: Optional[Webhook] = Webhook.query.filter(Webhook.id == webhook_id, Webhook.destroyed.is_(None)).first()
|
||||
if webhook is None:
|
||||
return response_404("The requested webhook could not be found.")
|
||||
return view_lifecycle(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue