mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed assorted flake8 errors.
This commit is contained in:
@@ -567,7 +567,7 @@ class FileField(Field):
|
||||
raise ValidationError(self.error_messages['invalid'], code='invalid')
|
||||
|
||||
if self.max_length is not None and len(file_name) > self.max_length:
|
||||
params = {'max': self.max_length, 'length': len(file_name)}
|
||||
params = {'max': self.max_length, 'length': len(file_name)}
|
||||
raise ValidationError(self.error_messages['max_length'], code='max_length', params=params)
|
||||
if not file_name:
|
||||
raise ValidationError(self.error_messages['invalid'], code='invalid')
|
||||
|
||||
@@ -117,7 +117,7 @@ def media_property(cls):
|
||||
if definition:
|
||||
extend = getattr(definition, 'extend', True)
|
||||
if extend:
|
||||
if extend == True:
|
||||
if extend is True:
|
||||
m = base
|
||||
else:
|
||||
m = Media()
|
||||
|
||||
Reference in New Issue
Block a user