Parcourir la source

Merge pull request #319 from tracim/fix/error_when_ro

Bastien Sevajol il y a 7 ans
Parent
révision
4a4f70559b
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      tracim/tracim/templates/file/getone.mak

+ 1 - 1
tracim/tracim/templates/file/getone.mak Voir le fichier

@@ -151,7 +151,7 @@
151 151
     % else:
152 152
         % if h.user_role(fake_api.current_user, result.file.workspace)<=1: # User must be a contributor to be allowed to upload files
153 153
             ${WIDGETS.SECURED_SECTION_TITLE(fake_api.current_user, result.file.workspace, 'file-revisions', _('File revisions'))}
154
-            <p>${_('This file contains {} revision(s)').format(sum(1 for revision in result.file.revisions if revision.action.id=='revision'))}</p>
154
+            <p>${_('This file contains {} revision(s)').format(result.file.revision_nb)}</p>
155 155
         % else:
156 156
             % if (h.user_role(fake_api.current_user, result.file.workspace)>1 and not result.file.is_archived and not result.file.is_deleted):
157 157
                 ${BUTTON.DATA_TARGET_AS_TEXT('new-file-revision', _('upload a new revision and/or comment...'), 'btn btn-success t-spacer-below')}