Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
cymed committed Nov 10, 2023
1 parent fedc3fb commit f868419
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
7 changes: 4 additions & 3 deletions view/create_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,11 @@ def create_views(srid: int,
cursr = connctn.cursor()
plantype_row_sql= "SELECT * from qgep_vl.wastewater_structure_symbol_plantype"
cursr.execute(plantype_row_sql)
for plantype_row in cursr.fetchall()
vw_qgep_ws_symbol_plantype(srid=srid, pg_service=pg_service, extra_definition=extra_definition, plantype_row=plantype_row)
cursr.close()
rows = cursr.fetchall();
cursr.close()
connctn.close()
for plantype_row in rows:
vw_qgep_ws_symbol_plantype(srid=srid, pg_service=pg_service, extra_definition=extra_definition, plantype_row=plantype_row)

run_sql('view/vw_file.sql', pg_service, variables)

Expand Down
8 changes: 5 additions & 3 deletions view/vw_qgep_ws_plantype.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,11 +547,13 @@ def vw_qgep_ws_symbol_plantype(srid: int,
srid = args.srid or os.getenv('SRID')
pg_service = args.pg_service or os.getenv('PGSERVICE')
extra_definition = safe_load(open(args.extra_definition)) if args.extra_definition else {}
# symbol views
connctn = psycopg2.connect("service={0}".format(pg_service))
cursr = connctn.cursor()
plantype_row_sql= "SELECT * from qgep_vl.wastewater_structure_symbol_plantype"
cursr.execute(plantype_row_sql)
for plantype_row in cursr.fetchall()
vw_qgep_ws_symbol_plantype(srid=srid, pg_service=pg_service, extra_definition=extra_definition, plantype_row=plantype_row)
cursr.close()
rows = cursr.fetchall();
cursr.close()
connctn.close()
for plantype_row in rows:
vw_qgep_ws_symbol_plantype(srid=srid, pg_service=pg_service, extra_definition=extra_definition, plantype_row=plantype_row)

0 comments on commit f868419

Please sign in to comment.