Commit a4d1b70f authored by Nicolas Delaby's avatar Nicolas Delaby

prevent IndexError if there is no latest version

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39360 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 65c27dbc
......@@ -469,8 +469,8 @@ class Document(DocumentExtensibleTraversableMixin, XMLObject, UrlMixIn, CachedCo
return result_list[0].getObject()
except IndexError:
return None
else:
first = result_list[0].getObject()
elif result_list:
first = result_list[0].getObject()
in_original = None
for record in result_list:
document = record.getObject()
......
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