Skip to content

Documentation mistake on custom _id with UUID? #1451

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
frazzleuk opened this issue Apr 30, 2021 · 1 comment
Closed

Documentation mistake on custom _id with UUID? #1451

frazzleuk opened this issue Apr 30, 2021 · 1 comment

Comments

@frazzleuk
Copy link

frazzleuk commented Apr 30, 2021

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).

@nicolaiarocci
Copy link
Member

thanks for reporting this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants