diff --git a/ckanext/odsh/templates/package/snippets/resource_item.html b/ckanext/odsh/templates/package/snippets/resource_item.html
index 20daf85e2a72769f395c2f7d2f8d7f2719716532..295b331483c714545cd3b5b03439f7079799b162 100644
--- a/ckanext/odsh/templates/package/snippets/resource_item.html
+++ b/ckanext/odsh/templates/package/snippets/resource_item.html
@@ -1,7 +1,7 @@
 {% set url_action = 'resource_edit' if url_is_edit and can_edit else 'resource_read' %}
 {% set url = h.url_for(controller='package', action=url_action, id=pkg.name, resource_id=res.id) %}
 
-{% set download = res.url or url %}
+{% set download = url or res.url%}
 {% set res_details = h.odsh_get_resource_details(res.id) %}
 
 <li class="resource-item" data-id="{{ res.id }}">