Skip to content

Documentation mistake on custom _id with UUID?  #1451

Description

@frazzleuk

I was following the documentation about using UUIDs as the _id field (https://docs.python-eve.org/en/stable/tutorials/custom_idfields.html). I followed the instructions and kept receiving an error back saying:

{"_id": "must be of uuid type"}

The issues was caused by _validate_type_uuid method not returning a value. Adding return True fixed it.

The other type validators all return True on success (https://github.com/pyeve/eve/blob/master/eve/io/mongo/validation.py#L220).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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