Hello,
I try to get a Subject from the database, if this fails i want to create
a new one. But how ever i arrange hub.begin(), hub.end() and
hub.commit() i always get an
AssertionError: This transaction has already gone through ROLLBACK;
begin another transaction
For the except statement (object does not exist, create a new one)
hub.begin()
try:
subject = Subject.byName(name)
hub.commit
hub.end()
except SQLObjectNotFound:
hub.end()
hub.begin()
subject = Subject(name = name)
hub.commit()
hub.end()
The hub is of type PackageHub, I didn't found documentation for it
(deprecated?).
Thanks for help,
--
Soni Bergraj