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

Fix history behaviour for an unknown OID.

KeyError must be raised if the history is empty, see
HistoryTests.checkSimpleHistory test case.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1799 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 88c25449
......@@ -909,6 +909,11 @@ class Application(object):
# Use by getSerial
return self.local_var.history
if self.local_var.history[1] == []:
# KeyError expected if no history was found
# XXX: this may requires an error from the storages
raise KeyError
# Now that we have object informations, get txn informations
history_list = []
for serial, size in self.local_var.history[1]:
......
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