diff --git a/docs/stefans_scripts/export/sia405_abwasser_2015/create_vsa_dss_2015_2_d.count_element_vsa_dss_2015.sql b/docs/stefans_scripts/export/sia405_abwasser_2015/create_vsa_dss_2015_2_d.count_element_vsa_dss_2015.sql index 7afd31e9..c357d23d 100644 --- a/docs/stefans_scripts/export/sia405_abwasser_2015/create_vsa_dss_2015_2_d.count_element_vsa_dss_2015.sql +++ b/docs/stefans_scripts/export/sia405_abwasser_2015/create_vsa_dss_2015_2_d.count_element_vsa_dss_2015.sql @@ -149,7 +149,7 @@ check_wastewater_structures = check_wastewater_structures - table_elements::inte -- falls null ist gut, sonst IF check_wastewater_structures <> 0 THEN - list = list || 'ERROR: number of subclass elements of wastewater_structures NOT CORRECT in schmea vsa_dss_2015_2_d_3122: checksum = ' || check_wastewater_structures || ', '; + list = list || 'ERROR: number of subclass elements of wastewater_structures NOT CORRECT in schema vsa_dss_2015_2_d_3122: checksum = ' || check_wastewater_structures || ', '; ELSE list = list || ' OK: number of subclass elements of wastewater_structures OK in schema vsa_dss_2015_2_d_3122!' || ', '; END IF; @@ -194,7 +194,7 @@ list = list || table_elements || ', '; -- falls null ist gut, sonst IF check_wastewater_networkelements <> 0 THEN - list = list || 'ERROR: number of subclass elements of wastewater_networkelements NOT CORRECT in schmea vsa_dss_2015_2_d_3122: checksum = ' || check_wastewater_networkelements || ', '; + list = list || 'ERROR: number of subclass elements of wastewater_networkelements NOT CORRECT in schema vsa_dss_2015_2_d_3122: checksum = ' || check_wastewater_networkelements || ', '; ELSE list = list || ' OK: number of subclass elements of wastewater_networkelements OK in schema vsa_dss_2015_2_d_3122!' || ', '; END IF; @@ -254,7 +254,7 @@ check_structure_parts = check_structure_parts - table_elements::integer; -- falls null ist gut, sonst IF check_structure_parts <> 0 THEN - list = list || 'ERROR: number of subclass elements of structure parts NOT CORRECT in schmea vsa_dss_2015_2_d_3122: checksum = ' || check_structure_parts || ', '; + list = list || 'ERROR: number of subclass elements of structure parts NOT CORRECT in schema vsa_dss_2015_2_d_3122: checksum = ' || check_structure_parts || ', '; ELSE list = list || ' OK: number of subclass elements of structure parts OK in schema vsa_dss_2015_2_d_3122!' || ', '; END IF; diff --git a/qgepqwat2ili/gui/__init__.py b/qgepqwat2ili/gui/__init__.py index d7ae73fe..e23172c0 100644 --- a/qgepqwat2ili/gui/__init__.py +++ b/qgepqwat2ili/gui/__init__.py @@ -56,10 +56,11 @@ def _show_results(title, message, log_path, level): widget = iface.messageBar().createMessage(title, message) - button = QPushButton(widget) - button.setText("Show logs") - button.pressed.connect(lambda p=log_path: webbrowser.open(p)) - widget.layout().addWidget(button) + if log_path: + button = QPushButton(widget) + button.setText("Show logs") + button.pressed.connect(lambda p=log_path: webbrowser.open(p)) + widget.layout().addWidget(button) iface.messageBar().pushWidget(widget, level) @@ -433,7 +434,7 @@ def action_do_export(): progress_dialog.close() print("number of subclass elements of organisation NOT CORRECT") show_failure( - "ERROR: number of subclass elements of organisation NOT CORRECT in schmea qgep_od", + "ERROR: number of subclass elements of organisation NOT CORRECT in schema qgep_od", f"Add missing obj_id in organisation subclasses so that number of subclass elements match organisation elements. See qgep logs tab for details.", None, ) @@ -456,7 +457,7 @@ def action_do_export(): progress_dialog.close() print("ERROR: number of subclass elements of wastewater_structure NOT CORRECT") show_failure( - "ERROR: number of subclass elements of wastewater_structure NOT CORRECT in schmea qgep_od", + "ERROR: number of subclass elements of wastewater_structure NOT CORRECT in schema qgep_od", f"Add missing obj_id in wastewater_structure subclasses so that number of subclass elements match wastewater_structure elements. See qgep logs tab for details.", None, ) diff --git a/qgepqwat2ili/utils/ili2db.py b/qgepqwat2ili/utils/ili2db.py index 58afeef4..27e16e19 100644 --- a/qgepqwat2ili/utils/ili2db.py +++ b/qgepqwat2ili/utils/ili2db.py @@ -40,9 +40,13 @@ def check_organisation_subclass_data(): organisation_subclass_check=True logger.info(f"OK: number of subclass elements of class organisation OK in schema qgep_od!") else: - organisation_subclass_check=False - logger.info(f"ERROR: number of subclass elements of organisation NOT CORRECT in schmea qgep_od: checksum = {organisation_count} (positiv number means missing entries, negativ means too many subclass entries)") - print (f"ERROR: number of subclass elements of organisation NOT CORRECT in schmea qgep_od: checksum = {organisation_count} (positiv number means missing entries, negativ means too many subclass entries)") + organisation_subclass_check = False + logger.info( + f"ERROR: number of subclass elements of organisation NOT CORRECT in schema qgep_od: checksum = {organisation_count} (positiv number means missing entries, negativ means too many subclass entries)" + ) + print( + f"ERROR: number of subclass elements of organisation NOT CORRECT in schema qgep_od: checksum = {organisation_count} (positiv number means missing entries, negativ means too many subclass entries)" + ) return organisation_subclass_check @@ -76,9 +80,13 @@ def check_wastewater_structure_subclass_data(): wastewater_structure_subclass_check=True logger.info(f"OK: number of subclass elements of class wastewater_structure OK in schema qgep_od!") else: - wastewater_structure_subclass_check=False - logger.info(f"ERROR: number of subclass elements of wastewater_structure NOT CORRECT in schmea qgep_od: checksum = {wastewater_structure_count} (positiv number means missing entries, negativ means too many subclass entries)") - print (f"ERROR: number of subclass elements of wastewater_structure NOT CORRECT in schmea qgep_od: checksum = {wastewater_structure_count} (positiv number means missing entries, negativ means too many subclass entries)") + wastewater_structure_subclass_check = False + logger.info( + f"ERROR: number of subclass elements of wastewater_structure NOT CORRECT in schema qgep_od: checksum = {wastewater_structure_count} (positiv number means missing entries, negativ means too many subclass entries)" + ) + print( + f"ERROR: number of subclass elements of wastewater_structure NOT CORRECT in schema qgep_od: checksum = {wastewater_structure_count} (positiv number means missing entries, negativ means too many subclass entries)" + ) return wastewater_structure_subclass_check