Decouple QofBook creation from QofSession.

So that we don't create two books when loading a session.
Step 1 to not having a dirty book when we think we should have no
book at all.
This commit is contained in:
John Ralls
2018-06-17 16:43:33 -07:00
parent 0a4347bd5e
commit 8ff5af4c19
21 changed files with 146 additions and 145 deletions

View File

@@ -103,7 +103,7 @@ class Session(GnuCashCoreClass):
you don't need to cleanup and call end() and destroy(), that is handled
for you, and the exception is raised.
"""
GnuCashCoreClass.__init__(self, instance=instance)
GnuCashCoreClass.__init__(self, Book())
if book_uri is not None:
try:
self.begin(book_uri, ignore_lock, is_new, force_new)