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 2021/01/08 21:05:16 UTC
[allura] branch db/py3_more_fixes updated: py3: icon param is bytes
when empty
This is an automated email from the ASF dual-hosted git repository.
brondsem pushed a commit to branch db/py3_more_fixes
in repository https://gitbox.apache.org/repos/asf/allura.git
The following commit(s) were added to refs/heads/db/py3_more_fixes by this push:
new 00ba2ef py3: icon param is bytes when empty
00ba2ef is described below
commit 00ba2ef655d02b379d4b42125d18b689efd28009
Author: Dave Brondsema <db...@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')