Skip to content

Always defer to explicit overrides. #4198

@lovelydinosaur

Description

@lovelydinosaur

Some of these may already be covered, but we should make sure that all the following are satisfied:

  • If a user declares a field explicitly, but also includes it in extra_kwargs then warn/error.
  • If a user declares a field explicitly, but also includes it in read_only_fields then warn/error.
  • Don't allow get_uniqueness_extra_kwargs to override a declared field.
  • Don't allow get_uniqueness_extra_kwargs to override a flag that has been set in extra_kwargs.
  • If a serializer field has a default, then ensure that uniqueness validators use that for empty, rather than forcing required=True

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions