From cef68b7ab7caa56700336ccc825874b2e1861a59 Mon Sep 17 00:00:00 2001 From: Damiano Lombardi Date: Thu, 23 Mar 2023 09:27:02 +0100 Subject: [PATCH] Adaptation for model baker version > 6.4 --- qgepqwat2ili/gui/__init__.py | 2 +- qgepqwat2ili/qgep/export.py | 2 ++ qgepqwat2ili/utils/ili2db.py | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/qgepqwat2ili/gui/__init__.py b/qgepqwat2ili/gui/__init__.py index ae954998..110df1af 100644 --- a/qgepqwat2ili/gui/__init__.py +++ b/qgepqwat2ili/gui/__init__.py @@ -9,7 +9,7 @@ from qgis.core import Qgis, QgsProject, QgsSettings from qgis.PyQt.QtWidgets import QApplication, QFileDialog, QProgressDialog, QPushButton from qgis.utils import iface, plugins -from QgisModelBaker.libili2db import globals, ili2dbconfig, ili2dbutils +from QgisModelBaker.libs.modelbaker.iliwrapper import globals, ili2dbconfig, ili2dbutils from ....utils.qgeplayermanager import QgepLayerManager from .. import config diff --git a/qgepqwat2ili/qgep/export.py b/qgepqwat2ili/qgep/export.py index fabf2b8f..67e040de 100644 --- a/qgepqwat2ili/qgep/export.py +++ b/qgepqwat2ili/qgep/export.py @@ -104,6 +104,7 @@ def create_metaattributes(row): # OD : is this OK ? Don't we need a different t_id from what inserted above in organisation ? if so, consider adding a "for_class" arg to tid_for_row t_id=get_tid(row), t_seq=0, + t_basket=0, ) abwasser_session.add(metaattribute) @@ -116,6 +117,7 @@ def base_common(row, type_name): "t_type": type_name, "obj_id": row.obj_id, "t_id": get_tid(row), + "t_basket": 0, } def wastewater_structure_common(row): diff --git a/qgepqwat2ili/utils/ili2db.py b/qgepqwat2ili/utils/ili2db.py index 33bdbe4c..8ee493a5 100644 --- a/qgepqwat2ili/utils/ili2db.py +++ b/qgepqwat2ili/utils/ili2db.py @@ -47,6 +47,7 @@ def create_ili_schema(schema, model, log_path, recreate_schema=False): "--createFk", "--createFkIdx", "--createTidCol", + "--createBasketCol", "--importTid", "--noSmartMapping", "--defaultSrsCode",