allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dill...@apache.org
Subject [allura] 03/03: py3: icon param is bytes when empty
Date Wed, 13 Jan 2021 21:51:16 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit 81d3502663291fb3a6c14401d505af3d3417475b
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
AuthorDate: Fri Jan 8 16:01:09 2021 -0500

    py3: icon param is bytes when empty
---
 Allura/allura/controllers/project.py  | 2 +-
 Allura/allura/ext/admin/admin_main.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Allura/allura/controllers/project.py b/Allura/allura/controllers/project.py
index 5374a8c..1d27c72 100644
--- a/Allura/allura/controllers/project.py
+++ b/Allura/allura/controllers/project.py
@@ -673,7 +673,7 @@ class NeighborhoodAdminController(object):
             h.log_if_changed(nbhd, 'anchored_tools', anchored_tools,
                              'update neighborhood anchored tools')
 
-        if icon is not None and icon != '':
+        if icon is not None and icon != b'':
             if self.neighborhood.icon:
                 self.neighborhood.icon.delete()
                 M.ProjectFile.query.remove(dict(project_id=c.project._id, category=re.compile(r'^icon')))
diff --git a/Allura/allura/ext/admin/admin_main.py b/Allura/allura/ext/admin/admin_main.py
index d7d1ab1..a2384bd 100644
--- a/Allura/allura/ext/admin/admin_main.py
+++ b/Allura/allura/ext/admin/admin_main.py
@@ -402,7 +402,7 @@ class ProjectAdminController(BaseController):
             M.AuditLog.log('change project features to %s', features)
             c.project.features = features
 
-        if icon is not None and icon != '':
+        if icon is not None and icon != b'':
             if c.project.icon:
                 M.ProjectFile.query.remove(dict(project_id=c.project._id, category=re.compile(r'^icon')))
             M.AuditLog.log('update project icon')


Mime
View raw message