Skip to content

Commit

Permalink
sql formatting issue; addresses #1055
Browse files Browse the repository at this point in the history
  • Loading branch information
jtgilbert authored and philipbaileynar committed Nov 19, 2024
1 parent 7bf8481 commit af0ab3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/brat/sqlbrat/brat.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,9 @@ def brat(huc: int, hydro_flowlines: Path, hydro_igos: Path, hydro_dgos: Path,

# make sure there's a watershed table entry with the huc being run
with SQLiteCon(outputs_gpkg_path) as database:
database.curs.execute('SELECT * FROM Watersheds WHERE WatershedID = ?', (huc,))
database.curs.execute(f"SELECT * FROM Watersheds WHERE WatershedID = '{huc}'")
if not database.curs.fetchone():
database.curs.execute(f'UPDATE Watersheds SET WatershedID = {huc} WHERE WatershedID = {str(huc)[:8]}')
database.curs.execute(f"UPDATE Watersheds SET WatershedID = '{huc}' WHERE WatershedID = '{str(huc)[:8]}'")
database.conn.commit()

project.add_metadata([RSMeta('HUC8_Watershed', watershed_name)])
Expand Down

0 comments on commit af0ab3f

Please sign in to comment.