I have a ModelSerializer that I wish to require certain fields, even though it is possible for the model it is based on to have null values for those fields.
However, I cannot instantiate a serializer like this:
`s = MySerializer(model_instance)`
and then call `s.is_valid()` since that method only works if I initialized the serializer with a dictionary.
If I just create the serializer and grab the data from it without attempting to call is_valid, it does not respect the constraints in the serializer itself.
Any suggestions on how to solve this problem?
Thanks!