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):