Skip to content

Commit

Permalink
correct query
Browse files Browse the repository at this point in the history
  • Loading branch information
sjib committed Dec 12, 2024
1 parent feca9f9 commit 988c2c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qgepqwat2ili/utils/qgep_export_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ def get_ws_ids(classname):
ws_ids = []

# select all obj_id of the wastewater_nodes of wwtp_structure
cursor.execute(f"SELECT ws.obj_id FROM qgep_od.{classname};")
cursor.execute(f"SELECT obj_id FROM qgep_od.{classname};")

# cursor.fetchall() - see https://pynative.com/python-cursor-fetchall-fetchmany-fetchone-to-read-rows-from-table/
# ws_wn_ids_count = int(cursor.fetchone()[0])
Expand All @@ -1040,7 +1040,7 @@ def get_ws_ids(classname):
else:
# added cursor.execute again to see if with this all records will be available
# 15.11.2024 added - see https://stackoverflow.com/questions/58101874/cursor-fetchall-or-other-method-fetchone-is-not-working
cursor.execute(f"SELECT ws.obj_id FROM qgep_od.{classname};")
cursor.execute(f"SELECT obj_id FROM qgep_od.{classname};")
records = cursor.fetchall()

# 15.11.2024 - does not get all records, but only n-1
Expand Down

0 comments on commit 988c2c1

Please sign in to comment.