diff --git a/stude/study_groups/views.py b/stude/study_groups/views.py index 14c0699..2ac1632 100644 --- a/stude/study_groups/views.py +++ b/stude/study_groups/views.py @@ -119,6 +119,10 @@ class StudyGroupListNearView(generics.ListAPIView): # Now fetch the StudyGroups with the matching Subject models that are within 100m studygroups = StudyGroup.objects.filter(subject__in=user_subjects).annotate( distance=Distance('location', user_location)).filter(distance__lte=100) + + for group in studygroups: + # Annotate the group with the radius + group.radius = 30 return studygroups