diff --git a/api/views.py b/api/views.py index b1f8936..d3db78d 100644 --- a/api/views.py +++ b/api/views.py @@ -324,26 +324,6 @@ class UserUpdateAPIView(StaffEditorPermissionMixin, generics.UpdateAPIView): data=request.data, partial=True, ) - agreement_file = request.data.get("agreement_file") - if not agreement_file: - return Response( - {"message": "Agreement file is required."}, - status=status.HTTP_400_BAD_REQUEST, - ) - if agreement_file.size > 10 * 1024 * 1024: # 5 MB limit - return Response( - {"message": "File size exceeds 10 MB limit."}, - status=status.HTTP_400_BAD_REQUEST, - ) - if agreement_file.content_type not in [ - "application/pdf", - ]: - return Response( - {"message": "Invalid file type. Only PDF files are allowed."}, - status=status.HTTP_400_BAD_REQUEST, - ) - if agreement_file: - user.agreement = agreement_file serializer.is_valid(raise_exception=True) user.save() return super().update(request, *args, **kwargs)