test: make pylint happy
This commit is contained in:
parent
b410b5aa02
commit
4ac40a835b
2 changed files with 5 additions and 1 deletions
|
|
@ -47,6 +47,7 @@ class AuthView(View):
|
|||
* route: ``login``
|
||||
* template: ``/auth/login.mako``
|
||||
"""
|
||||
# pylint: disable=duplicate-code
|
||||
model = self.app.model
|
||||
session = session or Session()
|
||||
|
||||
|
|
@ -54,6 +55,7 @@ class AuthView(View):
|
|||
user = session.query(model.User).first()
|
||||
if not user:
|
||||
return self.redirect(self.request.route_url("setup"))
|
||||
# pylint: enable=duplicate-code
|
||||
|
||||
referrer = self.request.get_referrer()
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# wuttaweb -- Web App for Wutta Framework
|
||||
# Copyright © 2024-2025 Lance Edgar
|
||||
# Copyright © 2024-2026 Lance Edgar
|
||||
#
|
||||
# This file is part of Wutta Framework.
|
||||
#
|
||||
|
|
@ -51,6 +51,7 @@ class CommonView(View):
|
|||
This is normally the view shown when a user navigates to the
|
||||
root URL for the web app.
|
||||
"""
|
||||
# pylint: disable=duplicate-code
|
||||
model = self.app.model
|
||||
session = session or Session()
|
||||
|
||||
|
|
@ -58,6 +59,7 @@ class CommonView(View):
|
|||
user = session.query(model.User).first()
|
||||
if not user:
|
||||
return self.redirect(self.request.route_url("setup"))
|
||||
# pylint: enable=duplicate-code
|
||||
|
||||
# maybe auto-redirect anons to login
|
||||
if not self.request.user:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue