[Erp5-report] r15431 - /erp5/trunk/products/ERP5/Document/Document.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Aug 2 19:07:10 CEST 2007


Author: bartek
Date: Thu Aug  2 19:07:10 2007
New Revision: 15431

URL: http://svn.erp5.org?rev=15431&view=rev
Log:
Fixed a bug in getRevisionList (it expected and returned integers, while getRevision returns a string). Tested.

Modified:
    erp5/trunk/products/ERP5/Document/Document.py

Modified: erp5/trunk/products/ERP5/Document/Document.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Document.py?rev=15431&r1=15430&r2=15431&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Document.py (original)
+++ erp5/trunk/products/ERP5/Document/Document.py Thu Aug  2 19:07:10 2007
@@ -772,7 +772,10 @@
       Returns the list of revision numbers of the current document
       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')
   def mergeRevision(self):




More information about the Erp5-report mailing list