Skip to content

Commit 6459638

Browse files
committed
Adjusted the code to the 2.1 attribute name change from ._size to .size in upload file objects.
- Legacy-Id: 18054
1 parent 06fa5e5 commit 6459638

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ietf/utils/validators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ def __ne__(self, other):
5555
validate_regular_expression_string = RegexStringValidator()
5656

5757
def validate_file_size(file):
58-
if file._size > settings.SECR_MAX_UPLOAD_SIZE:
59-
raise ValidationError('Please keep filesize under %s. Requested upload size was %s' % (filesizeformat(settings.SECR_MAX_UPLOAD_SIZE), filesizeformat(file._size)))
58+
if file.size > settings.SECR_MAX_UPLOAD_SIZE:
59+
raise ValidationError('Please keep filesize under %s. Requested upload size was %s' % (filesizeformat(settings.SECR_MAX_UPLOAD_SIZE), filesizeformat(file.size)))
6060

6161
def validate_mime_type(file, valid):
6262
file.open()

0 commit comments

Comments
 (0)