New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Datapusher Core Extension #1200
Conversation
…s enabled ourselves
…tore. Instead of using the action or the template helper, check whether the plugin is enabled. Moved the action so that changing the url works even if the datapusher is disabled.
Conflicts: ckanext/datastore/tests/test_create.py
@kindly I removed the datapusher_enabled action and fixed one or two other small things. Ready for review. |
@kindly OK, I've finally got around to finishing the UI of this. I think I've caught all the conditions in a nice manner. Could you check for me and then if it's all OK, this is all good from my POV. |
@@ -235,6 +235,8 @@ def make_map(): | |||
]))) | |||
m.connect('dataset_edit', '/dataset/edit/{id}', action='edit', | |||
ckan_icon='edit') | |||
m.connect('dataset_resources', '/dataset/resources/{id}', | |||
action='resources', ckan_icon='time') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is another 'dataset_resources' route defined on line 246 (with a different icon), should one of these be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merge issue, fixed
'resource_id': res['id'], | ||
'set_url_type': True | ||
}) | ||
except KeyError: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about this try/except. res['id']
is already accessed on line 95, so this will not be thrown by line 101. Is this to catch a KeyError
in datapusher_submit
? That doesn't seem great. Maybe this is meant to be ValidationError
?
@kindly I've added one more thing for you to look at (the try/accept above), then I'm happy to merge when the tests are passing. |
…1200-datastore-read-only
Datapusher extension adds hooks to interact with the datapusher.
It also add a page to resource edit in order to resubmit a job.