-
Notifications
You must be signed in to change notification settings - Fork 34
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
Value is not a valid <type> when having column with null=True, default=None, required=False #290
Comments
@metakot This error occurs because |
Sorry, but no. This is nonsense. I can remember a lot of cases there database table has NULL fields and this is ok. The point here was what the piccolo admin cannot work with NULL fields at all (except for FK fields). Ok, I've checked and it works with datetime fields also. So you insist what we can use nullable datetime fields, but not ints? Also in django it works =) |
Not only integers, but ALL nullable fields except the varchar. And what to do with nullable varchar -- this is different story. Because empty string and NULL is different values with different meaning. |
Yeah, null is an option for some fields but not others. You're right about Varchar - we'll need a 'null' checkbox for that to distinguish between empty strings. We need to check all of the nullable fields to see which ones work. |
@metakot I'm sorry I offended you so much. I just wanted to help and I was wrong. Cheers. |
@sinisaos Nothing to apologise for - you were helping as best you could 👍 I'll have a look into it. I think integer fields is probably a good place to start. I don't tend to use many nullable columns in my projects besides foreign keys, but I know it'll bite me soon if any of my projects require it. |
I've added support for nullable number fields. I can't release it though because GitHub Actions is down. For fields like |
I released it manually on my local machine - try |
piccolo==0.107.0
piccolo-admin==0.44.0
piccolo-api==0.51.0
So I have this simple table
When I try to add the record in admin, it yells on me
Happens also with other fields like UUID.
What can we do here?
The text was updated successfully, but these errors were encountered: