From 9a0d92469bf57c69ca7ad524d03d2ec1a3b4710d Mon Sep 17 00:00:00 2001 From: Akshay Joshi Date: Wed, 24 Nov 2021 18:54:25 +0530 Subject: [PATCH] Use .__ne__ instead of 'is not None' statement to fix the API test cases. --- web/pgadmin/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/pgadmin/__init__.py b/web/pgadmin/__init__.py index b12af2cfc..16f4582b8 100644 --- a/web/pgadmin/__init__.py +++ b/web/pgadmin/__init__.py @@ -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.is_authenticated: + if current_user.__ne__(None) and current_user.is_authenticated: user_id = current_user.id else: user = user_datastore.find_user(email=config.DESKTOP_USER)