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 7026b64a9e083996ee00064a25af0018378cb4ce
Author: Dave Brondsema <dave@brondsema.net>
AuthorDate: Mon Jan 27 18:36:00 2020 -0500
Make my_projects_by_role_name always return a list, even when logged out
---
Allura/allura/model/auth.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Allura/allura/model/auth.py b/Allura/allura/model/auth.py
index fdda9ca..9abe552 100644
--- a/Allura/allura/model/auth.py
+++ b/Allura/allura/model/auth.py
@@ -757,7 +757,7 @@ class User(MappedClass, ActivityNode, ActivityObject, SearchIndexable):
that role.
"""
if self.is_anonymous():
- return
+ return []
reaching_role_ids = list(
g.credentials.user_roles(user_id=self._id).reaching_ids_set)
reaching_roles = ProjectRole.query.find(
|