forked from openlp/openlp
remove session instead of close to release file.
This commit is contained in:
parent
3b46b8416d
commit
e9e7285b8c
@ -191,10 +191,10 @@ def upgrade_db(url, upgrade):
|
||||
break
|
||||
except (SQLAlchemyError, DBAPIError):
|
||||
version_meta = Metadata.populate(key='version', value=int(upgrade.__version__))
|
||||
session.commit()
|
||||
session.remove()
|
||||
upgrade_version = upgrade.__version__
|
||||
version = int(version_meta.value)
|
||||
session.close()
|
||||
session.remove()
|
||||
return version, upgrade_version
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user