mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Removed an inactive system check for upload_to.
Thanks to Simon Charette for the eagle eyes.
This commit is contained in:
@@ -238,24 +238,10 @@ class FileField(Field):
|
||||
|
||||
def check(self, **kwargs):
|
||||
errors = super(FileField, self).check(**kwargs)
|
||||
#errors.extend(self._check_upload_to())
|
||||
errors.extend(self._check_unique())
|
||||
errors.extend(self._check_primary_key())
|
||||
return errors
|
||||
|
||||
def _check_upload_to(self):
|
||||
if not self.upload_to:
|
||||
return [
|
||||
checks.Error(
|
||||
'The field requires an "upload_to" attribute.',
|
||||
hint=None,
|
||||
obj=self,
|
||||
id='E031',
|
||||
)
|
||||
]
|
||||
else:
|
||||
return []
|
||||
|
||||
def _check_unique(self):
|
||||
if self._unique_set_explicitly:
|
||||
return [
|
||||
|
||||
Reference in New Issue
Block a user