[#87] Remove remote url_type from resources
Otherwise CKAN thinks they are uploads, datastore resources, etc, which it can cause problems eg when displaying the URL of the resource. We are just linking to the remote resource URL.
This commit is contained in:
parent
5739e541d7
commit
fbde0b8dc1
|
@ -373,6 +373,11 @@ class CKANHarvester(HarvesterBase):
|
||||||
|
|
||||||
package_dict['extras'][key] = value
|
package_dict['extras'][key] = value
|
||||||
|
|
||||||
|
# Clear remote url_type for resources (eg datastore, upload) as we
|
||||||
|
# are only creating normal resources with links to the remote ones
|
||||||
|
for resource in package_dict.get('resources', []):
|
||||||
|
resource.pop('url_type', None)
|
||||||
|
|
||||||
result = self._create_or_update_package(package_dict,harvest_object)
|
result = self._create_or_update_package(package_dict,harvest_object)
|
||||||
|
|
||||||
if result and self.config.get('read_only',False) == True:
|
if result and self.config.get('read_only',False) == True:
|
||||||
|
|
Loading…
Reference in New Issue