Skip to content

Commit

Permalink
Remove 'for_edit' and fix url strip
Browse files Browse the repository at this point in the history
  • Loading branch information
tino097 committed Dec 10, 2018
1 parent bf726ef commit 79d5379
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ckan/lib/dictization/model_dictize.py
Expand Up @@ -115,8 +115,8 @@ def resource_dictize(res, context):
resource_id=res.id,
filename=cleaned_name,
qualified=True)
elif resource['url'] and not urlparse.urlsplit(url).scheme and not context.get('for_edit'):
resource['url'] = u'http://' + url.lstrip('/')
elif resource['url'] and not urlparse.urlsplit(url).scheme:
res_dict['url'] = res_dict['url'].rsplit('/')[-1]
return resource


Expand Down

0 comments on commit 79d5379

Please sign in to comment.