Set URL type and webstore_last_updated upon (first) push
- Dominant language
- Python
- Stars
- 82
- Forks
- 157
- PR merge metrics
- No merged PRs in 30d
Description
I've noticed that when the datapusher is pushing data to the datastore for the first time, it doesn't set _webstore_last_updated_ or even the _url_type_ as datastore in the resource. The latter problem(?) seems to be that the setting of "set_url_type", which means update_resource doesn't get called*, but the bigger problem is that even though the comments in the update_resource method state that webstore_last_updated will be updated**, we then rely on the CKAN controller which does nothing with that field (one could also wonder why it should)***. I find it logical that both fields, url_type and webstore_last_updated, should get updated, even on the first push to the datastore. Thoughts?
*https://github.com/ckan/datapusher/blob/master/datapusher/jobs.py#L392:
I assume the logic is that if the resource is /already/ datastore, we are not setting the url_type field, and therefore this is an update, which also seems a bit fragile... but I haven't looked at the datapusher plugin code to confirm
*\* https://github.com/ckan/datapusher/blob/master/datapusher/jobs.py#L208
**\* https://github.com/ckan/ckan/blob/9ab53fd540869570275547c9aa2741d013a8ae97/ckan/logic/action/update.py#L105
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.