Commit a9588cb2 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Remove a assert that generate false positives.

It is valid to return 'None' value as the transaction information is not
present on all storage node concerned by the transaction.
Update related test.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1721 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 9e0e0d1e
......@@ -83,7 +83,6 @@ class Transaction(object):
return self._object_dict.keys()
def getTransactionInformations(self):
assert self._transaction is not None
return self._transaction
......@@ -137,6 +136,8 @@ class TransactionManager(object):
for oid in transaction.getOIDList():
self._load_lock_dict[oid] = tid
object_list = transaction.getObjectList()
# txn_info is None is the transaction information is not stored on
# this storage.
txn_info = transaction.getTransactionInformations()
# store data from memory to temporary table
self._app.dm.storeTransaction(tid, object_list, txn_info)
......
......@@ -44,7 +44,6 @@ class TransactionTests(NeoTestBase):
def testTransaction(self):
txn = Transaction(self.getNewUUID(), self.getNextTID())
self.assertRaises(AssertionError, txn.getTransactionInformations)
oid_list = [self.getOID(1), self.getOID(2)]
txn_info = (oid_list, 'USER', 'DESC', 'EXT')
txn.prepare(*txn_info)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment