Changes between Initial Version and Version 1 of Ticket #29454


Ignore:
Timestamp:
May 28, 2018, 6:56:15 AM (7 years ago)
Author:
Tim Graham
Comment:

Did you find this to be a problem in practice?

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29454 – Description

    initial v1  
    1 By default, ```size``` of  django.core.files.uploadedfile is ```None``` and ```__len__``` will return ```size``` by default. Calling ```len``` will raise ```TypeError: 'NoneType' object cannot be interpreted as an integer``` error if size is not assigned specifically.
     1By default, `size` of  django.core.files.uploadedfile is `None` and `__len__` will return `size` by default. Calling `len` will raise `TypeError: 'NoneType' object cannot be interpreted as an integer` error if size is not assigned specifically.
    22
    3 Can this be handled better? such as do not implement ```__len__``` method if ```size``` is set as ```None```
     3Can this be handled better? Such not implementing `__len__` method if `size` is set as `None`.
Back to Top