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
"none is not an allowed value" #159
Comments
temporary solution: class TestSchema(Schema):
revenue_total: float = None |
@2ik |
well I cannot reproduce this.. maybe you can give more details.. your actual model and schema |
Thank you for your response Have you filled in the "revenue_total" field with value "None"? Not in admin, try directly in the database for example. v0.13.2 |
ok, I know whats' your issue you defined both django ninja basically uses the for you solution would be
PS. btw counting money with float field is not a good idea (if total revenue is money) - you should consider decimal (or integer coins) instead |
ok, understand. I just thought it was a bug in the package)) Yes, I have bad logic with the model, but I needed "default" for admin panel only. I will make changes to in method "save" As for the float field, it suits me better, because the numbers are approximate. I know about the money field, but thank you for paying attention to this ;) |
I found an error on the part of pydantic
Example:
output:
exception if the value in db is NULL
The text was updated successfully, but these errors were encountered: