Skip to content

Commit

Permalink
fix: avoid extraneous select statement in insert_node
Browse files Browse the repository at this point in the history
  • Loading branch information
cmelone committed Feb 22, 2024
1 parent 3b2fd5e commit cb4c5b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gantry/db/insert.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async def insert_node(db: aiosqlite.Connection, node: dict) -> int:
# this check ensures that something was inserted
# and not relying on lastrowid, which could be anything
if cursor.rowcount > 0:
pk = cursor.lastrowid
return cursor.lastrowid

pk = await get_node(db, node["uuid"])

Expand Down

0 comments on commit cb4c5b4

Please sign in to comment.