mirror of
https://github.com/lemeow125/StudE-Backend.git
synced 2024-11-17 06:19:24 +08:00
Hotfix for study groups radius
This commit is contained in:
parent
1b3207d86b
commit
d1244296f8
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue