Skip to content
Snippets Groups Projects
Commit 68090c94 authored by Jonah Husson's avatar Jonah Husson
Browse files

Move commit call outside of if statement

parent 38407d2f
No related branches found
No related tags found
1 merge request!9Remove truncate and add on conflict clause instead
...@@ -731,13 +731,13 @@ def set_authorizer_nodes(conn, to_add, to_delete): ...@@ -731,13 +731,13 @@ def set_authorizer_nodes(conn, to_add, to_delete):
try: try:
cur.execute(insert_command, [e for l in insert_list for e in l]) cur.execute(insert_command, [e for l in insert_list for e in l])
log.debug(cur.query) log.debug(cur.query)
conn.commit()
except Exception as e: except Exception as e:
log.error(f"Failed to insert into authorizer db: {cur.query}") log.error(f"Failed to insert into authorizer db: {cur.query}")
raise e raise e
finally: finally:
cur.close() cur.close()
conn.commit()
return to_revoke return to_revoke
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment