Skip to content

Commit

Permalink
updates to action.py and utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kowh-ai committed Jan 29, 2025
1 parent 03a4e67 commit 4b64d4e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ckanext/xloader/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def xloader_submit(context, data_dict):
"metadata": {
"ignore_hash": data_dict.get("ignore_hash", False),
"ckan_url": config.get("ckanext.xloader.site_url")
or config["ckan.site_url"],
or config["ckan.site_url"],
"resource_id": res_id,
"set_url_type": data_dict.get("set_url_type", False),
"task_created": task["last_updated"],
Expand Down
3 changes: 1 addition & 2 deletions ckanext/xloader/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,8 @@ def modify_ckan_url(result_url: str, ckan_url: str) -> str:
"""
parsed_url = urlparse(result_url)
base_url = f"{parsed_url.scheme}://{parsed_url.netloc}"
path_url = parsed_url.path

if base_url != ckan_url:
path_url = parsed_url.path
result_url = urljoin(ckan_url, path_url)

return result_url
Expand Down

0 comments on commit 4b64d4e

Please sign in to comment.