Skip to content
Snippets Groups Projects
Commit b2fe7008 authored by Radko Krkoš's avatar Radko Krkoš Committed by Jan Mach
Browse files

Fix: Hanging transaction in whois plugin configuration (re)load.

* This makes the ORM query handling to be in line with SQLAlchemy's design and expectations.

(Redmine issue: #4251)
parent 64c02c3e
No related branches found
No related tags found
No related merge requests found
...@@ -256,7 +256,6 @@ class SqldbWhoisModule(WhoisModule): ...@@ -256,7 +256,6 @@ class SqldbWhoisModule(WhoisModule):
# Load network records from SQL database. # Load network records from SQL database.
records = storage.session.query(mentat.datatype.sqldb.NetworkModel).all() records = storage.session.query(mentat.datatype.sqldb.NetworkModel).all()
storage.session.commit()
# Generate list of internal network record objects. # Generate list of internal network record objects.
networks = [] networks = []
...@@ -272,7 +271,7 @@ class SqldbWhoisModule(WhoisModule): ...@@ -272,7 +271,7 @@ class SqldbWhoisModule(WhoisModule):
networks.append(netw) networks.append(netw)
# Rollback any changes, we are not supposed to change anything. # Rollback any changes, we are not supposed to change anything.
#storage.session.rollback() storage.session.rollback()
# Let the parent implementation take care of loading internal lookup table. # Let the parent implementation take care of loading internal lookup table.
return super().setup(networks) return super().setup(networks)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment