mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
Fixed #8918 -- Made FileField.upload_to optional.
Thanks leahculver for the suggestion and dc and vajrasky for work on the patch.
This commit is contained in:
@@ -120,8 +120,6 @@ def get_validation_errors(outfile, app=None):
|
||||
if decimalp_ok and mdigits_ok:
|
||||
if decimal_places > max_digits:
|
||||
e.add(opts, invalid_values_msg % f.name)
|
||||
if isinstance(f, models.FileField) and not f.upload_to:
|
||||
e.add(opts, '"%s": FileFields require an "upload_to" attribute.' % f.name)
|
||||
if isinstance(f, models.ImageField):
|
||||
try:
|
||||
from django.utils.image import Image
|
||||
|
||||
Reference in New Issue
Block a user