Fixed unhashable type issue while opening the about dialog. Fixes #7048

This commit is contained in:
Akshay Joshi
2021-12-03 12:31:59 +05:30
parent 5ae1036a24
commit 9c0c046a38
3 changed files with 5 additions and 5 deletions

View File

@@ -310,7 +310,7 @@ def create_app(app_name=None):
if config.SERVER_MODE is False:
# Get the user language preference from the miscellaneous module
user_id = None
if current_user.__ne__(None) and current_user.is_authenticated:
if current_user and current_user.is_authenticated:
user_id = current_user.id
else:
user = user_datastore.find_user(email=config.DESKTOP_USER)

View File

@@ -9,8 +9,7 @@
"""A blueprint module implementing the about box."""
import sys
from flask import Response, render_template, __version__, url_for, request
from flask import Response, render_template, url_for, request
from flask_babel import gettext
from flask_security import current_user, login_required
from pgadmin.utils import PgAdminModule
@@ -98,11 +97,11 @@ def index():
if isinstance(getattr(config, setting), str):
settings = \
settings + '{} = "{}"\n'.format(
setting, gettext(getattr(config, setting)))
setting, getattr(config, setting))
else:
settings = \
settings + '{} = {}\n'.format(
setting, gettext(getattr(config, setting)))
setting, getattr(config, setting))
info['settings'] = settings