mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Refs #27358 -- Fixed system check crash with an empty FileField.upload_to.
This commit is contained in:
@@ -256,7 +256,7 @@ class FileField(Field):
|
||||
return []
|
||||
|
||||
def _check_upload_to(self):
|
||||
if isinstance(self.upload_to, six.string_types) and self.upload_to[0] == '/':
|
||||
if isinstance(self.upload_to, six.string_types) and self.upload_to.startswith('/'):
|
||||
return [
|
||||
checks.Error(
|
||||
"%s's 'upload_to' argument must be a relative path, not an "
|
||||
|
||||
Reference in New Issue
Block a user