Validate dataset before create or update#312
Open
Zharktas wants to merge 8 commits intockan:masterfrom
Open
Conversation
…tself if there is validation error during package_create
metaodi
reviewed
Feb 13, 2018
Member
metaodi
left a comment
There was a problem hiding this comment.
I really like this approach. Could you maybe create a test for this new option?
| except (AttributeError, IndexError): | ||
| package_type = 'dataset' | ||
| # in case a 'dataset' plugin was registered w/o fallback | ||
| package_plugin = lib_plugins.lookup_package_plugin(package_type) |
Member
There was a problem hiding this comment.
Shouldn't that line be one level higher? Otherwise package_plugin is not set if there was no exception on line 540.
Member
Author
There was a problem hiding this comment.
package_plugin is set on line 537 and most of that code is actually copy paste from here https://github.com/ckan/ckan/blob/master/ckan/logic/action/create.py#L136
Member
There was a problem hiding this comment.
Ah perfect, thanks for the explanation!
Member
Author
|
I'll commit some tests and check that comment once I've cured of this flu of mine, so probably in couple of days or so. |
This was referenced May 18, 2021
Contributor
|
Is it something that can be rebased/reworked? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Attempt number 2 to fix #151.
Dataset is now validated before it is given to the baseharvester, if there is validation error it is raised again to store it to the harvester log.