We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When a field is marked as unique and nullable (optional) I would expect that no duplicate values are allowed except null/None.
A wourkaround could be to omit the default None and omit the field. But would it not make more sense to allow multiple null values?
schema = { 'optional_unique_value': { 'type': 'string', 'default': None, 'unique': True, 'nullable': True, } }
An error message is given: "value 'None' is not unique"
The text was updated successfully, but these errors were encountered:
Could it be possible to remove the unique value and run the a check the application's logic?
Sorry, something went wrong.
No branches or pull requests
Expected Behavior
When a field is marked as unique and nullable (optional) I would expect that no duplicate values are allowed except null/None.
A wourkaround could be to omit the default None and omit the field. But would it not make more sense to allow multiple null values?
Actual Behavior
An error message is given: "value 'None' is not unique"
Environment
The text was updated successfully, but these errors were encountered: