You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2020/11/11 20:50:12 UTC

[allura] 02/02: Don't let size warning flash message disappear

This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git

commit f7d0824a5e21f83691455dd00fd870794ef21302
Author: Dave Brondsema <da...@brondsema.net>
AuthorDate: Wed Nov 11 15:44:15 2020 -0500

    Don't let size warning flash message disappear
---
 Allura/allura/controllers/repository.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Allura/allura/controllers/repository.py b/Allura/allura/controllers/repository.py
index a4396e9..4cd5f20 100644
--- a/Allura/allura/controllers/repository.py
+++ b/Allura/allura/controllers/repository.py
@@ -849,7 +849,8 @@ class FileBrowser(BaseController):
         if kw.pop('format', 'html') == 'raw':
             if self._blob.size > asint(tg.config.get('scm.download.max_file_bytes', 30*1000*1000)):
                 large_size = self._blob.size
-                flash('File is {}.  Too large to download.'.format(h.do_filesizeformat(large_size)), 'warning')
+                flash('File is {}.  Too large to download.'.format(h.do_filesizeformat(large_size)),
+                      'warning', sticky=True)
                 raise exc.HTTPForbidden
             else:
                 return self.raw()