Skip to content

Commit

Permalink
Merge pull request #4582 from tuffnatty/migrate_filestore_fix
Browse files Browse the repository at this point in the history
Fixed migrate_filestore by not feeding None to mimetypes.guess_type()
  • Loading branch information
wardi committed Dec 11, 2018
2 parents 5ce4ae9 + 33ffe5e commit da9b0cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ckan/lib/uploader.py
Expand Up @@ -221,7 +221,7 @@ def __init__(self, resource):
upload_field_storage = resource.pop('upload', None)
self.clear = resource.pop('clear_upload', None)

if config_mimetype_guess == 'file_ext':
if url and config_mimetype_guess == 'file_ext':
self.mimetype = mimetypes.guess_type(url)[0]

if isinstance(upload_field_storage, ALLOWED_UPLOAD_TYPES):
Expand Down

0 comments on commit da9b0cc

Please sign in to comment.