Commit 15a425d7 by chrisndodge

Merge pull request #20 from edx-solutions/api

null guard
parents a738bd12 95d0ee36
......@@ -76,7 +76,7 @@ def group_list(request):
# allow for optional meta information about groups, this will end up in the GroupProfile table
group_type = request.DATA.get('group_type')
data = json.dumps(request.DATA.get('data'))
data = json.dumps(request.DATA.get('data')) if request.DATA.get('data') else None
if group_type or data:
profile, _ = GroupProfile.objects.get_or_create(group_id=group.id, group_type=group_type, data=data)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment