mirror of
https://github.com/lemeow125/StudE-Backend.git
synced 2025-06-28 16:25:44 +08:00
Fixed subject names still having \r symbols in them and fixed student status list view not working
This commit is contained in:
parent
e734afd631
commit
cc52931956
3 changed files with 4 additions and 4 deletions
|
@ -17,7 +17,7 @@ class StudentStatusSerializer(serializers.ModelSerializer):
|
|||
|
||||
class Meta:
|
||||
model = StudentStatus
|
||||
fields = '__all__'
|
||||
fields = ['user', 'subject', 'location', 'active', 'landmark']
|
||||
read_only_fields = ['user', 'landmark']
|
||||
|
||||
def create(self, validated_data):
|
||||
|
|
|
@ -22,8 +22,8 @@ class StudentStatusAPIView(generics.RetrieveUpdateAPIView):
|
|||
|
||||
class ActiveStudentStatusListAPIView(generics.ListAPIView):
|
||||
serializer_class = StudentStatusSerializer
|
||||
permission_classes = [IsAuthenticated]
|
||||
# permission_classes = [IsAuthenticated]
|
||||
|
||||
def get_queryset(self):
|
||||
user = self.request.user
|
||||
return StudentStatus.objects.filter(user != user).filter(active=True)
|
||||
return StudentStatus.objects.filter(active=True and user != user)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue