mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Fix black formatting
This commit is contained in:
parent
474597d16c
commit
25a1c67c26
@ -398,8 +398,8 @@ class PanelHandler(BaseHandler):
|
||||
template = "panel/contribute.html"
|
||||
|
||||
elif page == "dashboard":
|
||||
page_data['first_log'] = self.controller.first_login
|
||||
if self.controller.first_login and exec_user['username'] == 'admin':
|
||||
page_data["first_log"] = self.controller.first_login
|
||||
if self.controller.first_login and exec_user["username"] == "admin":
|
||||
self.controller.first_login = False
|
||||
if superuser: # TODO: Figure out a better solution
|
||||
try:
|
||||
|
@ -158,7 +158,7 @@ class PublicHandler(BaseHandler):
|
||||
logger.info(
|
||||
f"User: {user_data} Logged in from IP: {self.get_remote_ip()}"
|
||||
)
|
||||
if not user_data.last_ip and user_data.username == 'admin':
|
||||
if not user_data.last_ip and user_data.username == "admin":
|
||||
self.controller.first_login = True
|
||||
# record this login
|
||||
user_data.last_ip = self.get_remote_ip()
|
||||
|
Loading…
Reference in New Issue
Block a user