DRF ModelSerializer’s validated_data missing ‘id’ field after validation
I’m working with Django Rest Framework and encountered an issue with a ModelSerializer. I was trying to validate the ‘id’ field in request.data using a ModelSerializer, but found that serializer.validated_data was missing the ‘id’ field even though serializer.is_valid() returned True. I’ve since resolved the issue by switching to a simple Serializer, but I’m trying to understand why the ModelSerializer didn’t work as expected. Any insights would be appreciated.