mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Python bindings - fix creation of new xml files
This commit is contained in:
parent
e59c3e0639
commit
abf78a202c
@ -102,7 +102,13 @@ class Session(GnuCashCoreClass):
|
|||||||
if book_uri is not None:
|
if book_uri is not None:
|
||||||
try:
|
try:
|
||||||
self.begin(book_uri, ignore_lock, is_new, force_new)
|
self.begin(book_uri, ignore_lock, is_new, force_new)
|
||||||
self.load()
|
# Take care of backend inconsistency
|
||||||
|
# New xml file can't be loaded, new sql store
|
||||||
|
# has to be loaded before it can be altered
|
||||||
|
# Any existing store obviously has to be loaded
|
||||||
|
# More background: https://bugzilla.gnome.org/show_bug.cgi?id=726891
|
||||||
|
if book_uri[:3] != "xml" or not is_new:
|
||||||
|
self.load()
|
||||||
except GnuCashBackendException, backend_exception:
|
except GnuCashBackendException, backend_exception:
|
||||||
self.end()
|
self.end()
|
||||||
self.destroy()
|
self.destroy()
|
||||||
|
Loading…
Reference in New Issue
Block a user