Skip to content

Update mapping to status = disabled fails validation #125

Closed

Description

@wind197

Attempting to update a user mapping to set status to disabled fails pydantic validation when the position field is None. Per the API, this value should be set to null to remain unchanged.

pydantic_core._pydantic_core.ValidationError: 1 validation error for Mapping
position
  Input should be a valid integer [type=int_type, input_value=None, input_type=NoneType]
    For further information visit https://errors.pydantic.dev/2.13/v/int_type

Using the existing position value in the update request generates a 422 error from the API.

HTTP response body: {"code":422,"message":"Validation Failed","errors":[{"field":"position","message":["Position cannot be set while the mapping is not enabled."]}]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions