Skip to content

Commit

Permalink
Fixed migrate_filestore by not feeding None to mimetypes.guess_type()
Browse files Browse the repository at this point in the history
  • Loading branch information
tuffnatty committed Dec 7, 2018
1 parent a4ec78e commit 33ffe5e
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 33ffe5e

Please sign in to comment.