Fakultas Ilmu Komputer UI

Commit 259b980b authored by Claudio Yosafat's avatar Claudio Yosafat
Browse files

Changing views accounts to cannot submit only number on skills

parent 5227d6ab
Pipeline #25214 passed with stages
in 5 minutes and 57 seconds
......@@ -81,6 +81,8 @@ class StudentViewSet(viewsets.ModelViewSet):
serializer = self.serializer_class(user, data=request.data, partial=True)
if serializer.is_valid():
if serializer.validated_data.get('skills') is not None and serializer.validated_data.get('skills').isdigit():
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
return Response(serializer.data, status=status.HTTP_202_ACCEPTED)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment