Skip to content

Commit

Permalink
Minor bug fix: populate combo visit_class where ui_tablename is not n…
Browse files Browse the repository at this point in the history
…ull on config_visit_class (tab visit from custom form)
  • Loading branch information
edgarfuste committed Jun 7, 2022
1 parent e856111 commit ebc5d2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/shared/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -2671,7 +2671,7 @@ def _fill_tbl_hydrometer_values(self, qtable, table_name):
def _fill_tab_visit(self, geom_type):
""" Fill tab Visit """

sql = f"SELECT id, ui_tablename FROM config_visit_class WHERE feature_type = upper('{geom_type}')"
sql = f"SELECT id, ui_tablename FROM config_visit_class WHERE feature_type = upper('{geom_type}') AND ui_tablename IS NOT NULL"
rows = tools_db.get_rows(sql)
table_visit_node_dict = {}
if not rows:
Expand Down Expand Up @@ -2714,7 +2714,7 @@ def _fill_tbl_visit(self, widget, table_name, filter_, geom_type):
sql = ("SELECT DISTINCT(class_id), config_visit_class.idval"
" FROM v_ui_om_visit_x_" + feature_type.lower() + ""
" JOIN config_visit_class ON config_visit_class.id = v_ui_om_visit_x_" + feature_type.lower() + ".class_id"
" WHERE " + feature_key + " IS NOT NULL AND " + str(feature_key) + " = '" + str(self.feature_id) + "'")
" WHERE " + feature_key + " IS NOT NULL AND " + str(feature_key) + " = '" + str(self.feature_id) + "' AND ui_tablename IS NOT NULL")
rows = tools_db.get_rows(sql)
tools_qt.fill_combo_values(self.cmb_visit_class, rows, 1)

Expand Down

0 comments on commit ebc5d2e

Please sign in to comment.