gnucash stable: Revisit Bug 799308.
John Ralls
jralls at code.gnucash.org
Sat Oct 26 20:59:37 EDT 2024
Updated via https://github.com/Gnucash/gnucash/commit/6cabb5d8 (commit)
from https://github.com/Gnucash/gnucash/commit/70c83323 (commit)
commit 6cabb5d88433049bbc9caff8d0ff72f03009d30c
Author: John Ralls <jralls at ceridwen.us>
Date: Sat Oct 26 17:05:00 2024 -0700
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.
diff --git a/bindings/python/gnucash_core.py b/bindings/python/gnucash_core.py
index cddf769c80..993ad8919b 100644
--- a/bindings/python/gnucash_core.py
+++ b/bindings/python/gnucash_core.py
@@ -356,6 +356,9 @@ class Session(GnuCashCoreClass):
if mode is None:
mode = SessionOpenMode.SESSION_NORMAL_OPEN
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:
self.end()
self.destroy()
Summary of changes:
bindings/python/gnucash_core.py | 3 +++
1 file changed, 3 insertions(+)
More information about the gnucash-changes
mailing list