From 8ec5d4e18b2278b81036b4910e5ce5b9959c7dda Mon Sep 17 00:00:00 2001 From: signedav Date: Tue, 29 Oct 2024 12:23:02 +0100 Subject: [PATCH] when setting up a configuration for a specific ili2db command, then set the user account name as pg name in case there is no other username passed (from config, or auth or servicefile) --- QgisModelBaker/gui/panel/session_panel.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/QgisModelBaker/gui/panel/session_panel.py b/QgisModelBaker/gui/panel/session_panel.py index 2ca63c22..5427b48a 100644 --- a/QgisModelBaker/gui/panel/session_panel.py +++ b/QgisModelBaker/gui/panel/session_panel.py @@ -108,6 +108,13 @@ def __init__( # set up the values self.configuration = general_configuration + if self.configuration.tool & DbIliMode.pg: + # on pg we should consider the user account name as fallback + if ( + not self.configuration.db_use_super_login + and not self.configuration.dbusr + ): + self.configuration.dbusr = QgsApplication.userLoginName() if self.db_action_type == DbActionType.GENERATE: self.configuration.ilifile = "" if os.path.isfile(self.file):