Skip to content

Partial updates always change fields that are not in data, read only, and have a default #3565

@melinath

Description

@melinath

This is kind of an edge case, maybe? Maybe not. I ran into it because I have a field which is readonly on update but has a default for the create case.

See Serializer._writable_fields. I'm trying to do a partial update on one field, but I have another field that's readonly on update. BUT instead of being left alone, since it has a default, it always gets set TO THAT DEFAULT.

From my reading of writable_fields, it looks like this would happen with any field that has a default and isn't included in a partial update, but for it to happen on a read_only field seems particularly egregious to me. :-p

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy