You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When passing omitted fields to the serializer in a views' get_serializer method, it still seems to be possible to save/update said fields, even though they're not returned in the Response.
Will not return example_field in the response, however any value passed into a PUT or PATCH request for that field will still be saved on the model.
Fields don't seem to be omitted until to_representation is called, but the lateness of that call means that the serializer still contains these fields up until the response is prepared. Is this the expected behavior? It seems contrary to what I would expect.
The text was updated successfully, but these errors were encountered:
When passing omitted fields to the serializer in a views'
get_serializer
method, it still seems to be possible to save/update said fields, even though they're not returned in the Response.For example:
Will not return
example_field
in the response, however any value passed into aPUT
orPATCH
request for that field will still be saved on the model.Fields don't seem to be omitted until
to_representation
is called, but the lateness of that call means that the serializer still contains these fields up until the response is prepared. Is this the expected behavior? It seems contrary to what I would expect.The text was updated successfully, but these errors were encountered: