make resource urls optional#2844
Merged
Merged
Conversation
Contributor
Author
|
related to #2769 |
Contributor
Author
|
This still needs a review of the front end to warn users about creating resources without urls. (Maybe allow creation of datasets without resources with similar language? might be another issue for that) I also need to add tests to see that the API behaves in a sensible way: returning an empty string when url not provided. Not prefixing an empty string with 'http://' etc. |
Closed
…ource['url'] as 'http://' after the resource is retrieved from the database. In this way, the value of resource['url'] is kept as null at front end. We have tested the update with the others in the same branch using the default web UI front. For a resuouce with an empty url, in the Resource Page , the line for URL and the Go to resource Button are not displayed. In the Package page, the Go to resource button is not included in the Explore pop up menu. There is no extra log message shown up in the console.
Contributor
Author
|
@amercader @yingqiaogit is working on a test for this so hold off reviewing just yet |
Contributor
Author
|
@amercader added the replacement test |
This was referenced Jun 16, 2016
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.
When uploading a file or when creating a datastore resource, CKAN requires a dummy value entered in to the url field simply to pass validation.
Some users may want to create resources that aren't accessible publicly yet, again requiring some kind of dummy value to be entered.