-
Notifications
You must be signed in to change notification settings - Fork 31
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
DJ01 with ImageField #82
Comments
Good catch, Django won't allow an empty value to be set on an ImageField, the empty value is actually null so this check is not correct. Would you like to contribute by removing the ImageField from the List of checks, as it was done on this PR with the UUIDField: #81 ? |
Sure! I will take a look at it later! |
Solved by #84. |
🤔 and in https://docs.djangoproject.com/en/3.1/ref/models/fields/#filefield
I think it should be reverted. |
@rsalmaso this check was not correct since FileField and ImageField get set to null when there is an empty value so null=True is a valid option: https://github.com/django/django/blob/master/django/forms/fields.py#L553 The fact that they both inherit from CharField, in this case, doesn't change anything, because they both override the |
Writing today some code I found this
And I wonder what's going on here? I am using django-storages to store my images on S3 and, in the end, a URL is stored in the database, that's true, but this error makes no sense whatsoever, correct? Am I missing something?
The text was updated successfully, but these errors were encountered: