Skip to content

Commit

Permalink
[#5031] Use bool in upload field check
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Jan 10, 2020
1 parent ebcbdcc commit 856a9a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ckan/lib/uploader.py
Expand Up @@ -214,7 +214,7 @@ def __init__(self, resource):
if url and config_mimetype_guess == 'file_ext':
self.mimetype = mimetypes.guess_type(url)[0]

if upload_field_storage and \
if bool(upload_field_storage) and \
isinstance(upload_field_storage, ALLOWED_UPLOAD_TYPES):
self.filesize = 0 # bytes

Expand Down

0 comments on commit 856a9a1

Please sign in to comment.