Skip to content

Commit

Permalink
Changed code in order to account for backwards compatibility with cgi…
Browse files Browse the repository at this point in the history
….Fieldstorage
  • Loading branch information
shasan-marsdd committed Oct 15, 2019
1 parent e69a503 commit e2e58db
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ckan/lib/uploader.py
Expand Up @@ -144,8 +144,9 @@ def update_data_dict(self, data_dict, url_field, file_field, clear_field):
if not self.storage_path:
return

if isinstance(self.upload_field_storage, (ALLOWED_UPLOAD_TYPES)):
if self.upload_field_storage:
if isinstance(self.upload_field_storage, (ALLOWED_UPLOAD_TYPES,)):
if self.upload_field_storage \
and self.upload_field_storage.filename:
self.filename = self.upload_field_storage.filename
self.filename = str(datetime.datetime.utcnow()) + self.filename
self.filename = munge.munge_filename_legacy(self.filename)
Expand Down

0 comments on commit e2e58db

Please sign in to comment.