opengisch / QgisModelBaker

Create QGIS projects from database schemas or Interlis models
https://opengisch.github.io/QgisModelBaker/
GNU Lesser General Public License v3.0
55 stars 17 forks source link

Data validation of baskets with empty t_ili_tid fails #957

Open webrian opened 2 months ago

webrian commented 2 months ago

grafik

grafik

the basket validation fails with:

Traceback (most recent call last):
  File "C:\Users/bjsvwweb/AppData/Roaming/QGIS/QGIS3\profiles\INTEGRATION/python/plugins\QgisModelBaker\gui\validate.py", line 391, in _run
    self._validator_stdout(f"Run: {validator.command(True)}")
  File "C:\Users/bjsvwweb/AppData/Roaming/QGIS/QGIS3\profiles\INTEGRATION/python/plugins\QgisModelBaker\libs\modelbaker\iliwrapper\iliexecutable.py", line 99, in command
    args = self._args(hide_password)
  File "C:\Users/bjsvwweb/AppData/Roaming/QGIS/QGIS3\profiles\INTEGRATION/python/plugins\QgisModelBaker\libs\modelbaker\iliwrapper\ilivalidator.py", line 42, in _args
    args = super()._args(hide_password)
  File "C:\Users/bjsvwweb/AppData/Roaming/QGIS/QGIS3\profiles\INTEGRATION/python/plugins\QgisModelBaker\libs\modelbaker\iliwrapper\iliexecutable.py", line 80, in _args
    return get_ili2db_args(self.configuration, hide_password)
  File "C:\Users/bjsvwweb/AppData/Roaming/QGIS/QGIS3\profiles\INTEGRATION/python/plugins\QgisModelBaker\libs\modelbaker\iliwrapper\ili2dbargs.py", line 40, in get_ili2db_args
    return configuration.to_ili2db_args(db_args)
  File "C:\Users/bjsvwweb/AppData/Roaming/QGIS/QGIS3\profiles\INTEGRATION/python/plugins\QgisModelBaker\libs\modelbaker\iliwrapper\ili2dbconfig.py", line 451, in to_ili2db_args
    self.append_args(args, ["--baskets", ";".join(self.baskets)])
TypeError: sequence item 0: expected str instance, NoneType found

grafik

the validation works! It is the same issue in the export Wizard as well.

signedav commented 2 months ago

The bug here is that baskets without t_ili_tid are provided to the selection in the validator...