mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-21 16:38:06 -06:00
Revisit Bug 799308.
Existing files/databases obviously should still be loaded. What's changed is that databases no longer need to be loaded to force creation, they do that on their own.
This commit is contained in:
parent
70c83323f7
commit
6cabb5d884
@ -356,6 +356,9 @@ class Session(GnuCashCoreClass):
|
|||||||
if mode is None:
|
if mode is None:
|
||||||
mode = SessionOpenMode.SESSION_NORMAL_OPEN
|
mode = SessionOpenMode.SESSION_NORMAL_OPEN
|
||||||
self.begin(book_uri, mode)
|
self.begin(book_uri, mode)
|
||||||
|
is_new = mode in (SessionOpenMode.SESSION_NEW_STORE, SessionOpenMode.SESSION_NEW_OVERWRITE)
|
||||||
|
if not is_new:
|
||||||
|
self.load()
|
||||||
except GnuCashBackendException as backend_exception:
|
except GnuCashBackendException as backend_exception:
|
||||||
self.end()
|
self.end()
|
||||||
self.destroy()
|
self.destroy()
|
||||||
|
Loading…
Reference in New Issue
Block a user