Commit 7f3df9c0 authored by Bartek Górny's avatar Bartek Górny

Fixed a bug in getRevisionList (it expected and returned integers, while...

Fixed a bug in getRevisionList (it expected and returned integers, while getRevision returns a string). Tested.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15431 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3e5293c6
...@@ -772,7 +772,10 @@ class Document(XMLObject, UrlMixIn, ConversionCacheMixin, SnapshotMixin): ...@@ -772,7 +772,10 @@ class Document(XMLObject, UrlMixIn, ConversionCacheMixin, SnapshotMixin):
Returns the list of revision numbers of the current document Returns the list of revision numbers of the current document
by by analysing the change log of the current object. by by analysing the change log of the current object.
""" """
return range(0, self.getRevision()) revision = self.getRevision()
if revision == '':
return []
return [str(r) for r in range(0, int(self.getRevision()))]
security.declareProtected(Permissions.ModifyPortalContent, 'mergeRevision') security.declareProtected(Permissions.ModifyPortalContent, 'mergeRevision')
def mergeRevision(self): def mergeRevision(self):
......
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