Skip to content

Commit

Permalink
adding check to prevent errors
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanDietzMorris committed Jan 28, 2025
1 parent eaa6457 commit 07311e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion PLATER/services/util/graph_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ def run_sync(self,
"message": f'A driver error occurred: {e}'}]}
raise e
finally:
self.sync_neo4j_driver.close()
if self.sync_neo4j_driver:
self.sync_neo4j_driver.close()
self.sync_neo4j_driver = None

def ping(self, counter: int = 1, max_retries: int = 3):
Expand Down

0 comments on commit 07311e5

Please sign in to comment.