Fix an issue where the server-group node is getting registered twice for the first time.

This commit is contained in:
Khushboo Vashi 2023-12-21 14:39:29 +05:30
parent 0d287df6dd
commit c85a9be621
2 changed files with 4 additions and 3 deletions

View File

@ -105,7 +105,7 @@ app = create_app()
app.config['sessions'] = dict()
if setup_db_required:
setup.setup_db()
setup.setup_db(app)
# Authentication sources
if len(config.AUTHENTICATION_SOURCES) > 0:

View File

@ -472,10 +472,11 @@ class ManagePreferences:
@app.command()
def setup_db():
def setup_db(app: Annotated[str, typer.Argument(
help="This argument doesn't require in CLI mode.")] = None):
"""Setup the configuration database."""
app = create_app()
app = app or create_app()
create_app_data_directory(config)
print("pgAdmin 4 - Application Initialisation")