From 23265061b21ec0b256c17a5299199e19d9c10fd2 Mon Sep 17 00:00:00 2001 From: Akshay Joshi Date: Fri, 30 Jul 2021 15:44:46 +0530 Subject: [PATCH] Fixed an issue where an empty SQLite database file is created when try to get the version. --- web/pgadmin/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/pgadmin/__init__.py b/web/pgadmin/__init__.py index dd03242a6..568fd3e54 100644 --- a/web/pgadmin/__init__.py +++ b/web/pgadmin/__init__.py @@ -397,8 +397,7 @@ def create_app(app_name=None): # If version not available, user must have aborted. Tables are not # created and so its an empty db - version = get_version() - if not os.path.exists(SQLITE_PATH) or version == -1: + if not os.path.exists(SQLITE_PATH) or get_version() == -1: # If running in cli mode then don't try to upgrade, just raise # the exception if not cli_mode: