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

machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git

commit ab9800d9e7094dedfad7e67db8e56a4b453f313a
Author: Marcus Christie <machr...@iu.edu>
AuthorDate: Fri Feb 23 01:35:10 2018 -0500

    AIRAVATA-2688 Fix isMember for when there are no members
---
 django_airavata/apps/api/serializers.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/django_airavata/apps/api/serializers.py 
b/django_airavata/apps/api/serializers.py
index cf1e4a5..13199f5 100644
--- a/django_airavata/apps/api/serializers.py
+++ b/django_airavata/apps/api/serializers.py
@@ -151,7 +151,7 @@ class GroupSerializer(serializers.Serializer):
     def get_isMember(self, group):
         request = self.context['request']
         username = request.user.username + "@" + settings.GATEWAY_ID
-        return username in group.members
+        return group.members and username in group.members
 
 
 class ProjectSerializer(serializers.Serializer):

-- 
To stop receiving notification emails like this one, please contact
machris...@apache.org.

Reply via email to