Hotfix for study groups radius

This commit is contained in:
Keannu Bernasol 2023-12-19 18:35:54 +08:00
parent a246a5f24c
commit 1b3207d86b

View file

@ -70,12 +70,9 @@ class StudyGroupDistanceSerializer(serializers.ModelSerializer):
fields = '__all__'
read_only_fields = ['landmark', 'radius', 'students', 'distance']
def get_distance(self, obj):
return 30
def to_representation(self, instance):
representation = super().to_representation(instance)
representation['distance'] = self.get_distance(instance)
representation['distance'] = 30
return representation