Skip to content
Snippets Groups Projects
Commit 67e88b11 authored by Calen Pennington's avatar Calen Pennington
Browse files

Don't add user groups to the experiment metadata for Anonymous users

[REVE-158]
[REVE-148]
parent 2d338b34
No related branches found
No related tags found
No related merge requests found
......@@ -75,8 +75,11 @@ def get_experiment_user_metadata_context(course, user):
forum_roles = list(Role.objects.filter(users=user, course_id=course.id).values_list('name').distinct())
# get user partition data
partition_groups = get_all_partitions_for_course(course)
user_partitions = get_user_partition_groups(course.id, partition_groups, user, 'name')
if user.is_authenticated():
partition_groups = get_all_partitions_for_course(course)
user_partitions = get_user_partition_groups(course.id, partition_groups, user, 'name')
else:
user_partitions = {}
return {
'upgrade_link': upgrade_link,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment