mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-08-09 12:38:35 -05:00
Fixed an issue where the create_app() function was called twice if an SQLite database file was not present.
Remove the exec call to run the 'setup.py' instead call the setup database function directly.
This commit is contained in:
+3
-4
@@ -86,13 +86,11 @@ def load_servers(args):
|
||||
load_database_servers(args.load_servers, None, load_user, True)
|
||||
|
||||
|
||||
def setup_db():
|
||||
def setup_db(app):
|
||||
"""Setup the configuration database."""
|
||||
|
||||
create_app_data_directory(config)
|
||||
|
||||
app = create_app()
|
||||
|
||||
print("pgAdmin 4 - Application Initialisation")
|
||||
print("======================================\n")
|
||||
|
||||
@@ -193,4 +191,5 @@ if __name__ == '__main__':
|
||||
except Exception as e:
|
||||
print(str(e))
|
||||
else:
|
||||
setup_db()
|
||||
app = create_app()
|
||||
setup_db(app)
|
||||
|
||||
Reference in New Issue
Block a user