Skip to content
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

make resource urls optional #2844

Merged
merged 6 commits into from Jun 3, 2016

Conversation

Projects
None yet
3 participants
@wardi
Copy link
Contributor

commented Jan 25, 2016

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.

@wardi wardi added the To Discuss label Jan 25, 2016

@wardi

This comment has been minimized.

Copy link
Contributor Author

commented Jan 25, 2016

related to #2769

@wardi wardi removed the To Discuss label Jan 26, 2016

@wardi

This comment has been minimized.

Copy link
Contributor Author

commented Jan 27, 2016

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.

@wardi wardi added the WIP label Jan 27, 2016

@palcu palcu referenced this pull request Apr 5, 2016

Closed

CKAN API documentation #2944

A resource is allowed to have null value in its url. We don't set res…
…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.

@wardi wardi removed the WIP label May 1, 2016

@amercader amercader self-assigned this May 10, 2016

@wardi

This comment has been minimized.

Copy link
Contributor Author

commented May 13, 2016

@amercader @yingqiaogit is working on a test for this so hold off reviewing just yet

@wardi

This comment has been minimized.

Copy link
Contributor Author

commented May 16, 2016

@amercader added the replacement test

@amercader amercader merged commit f0eff66 into master Jun 3, 2016

1 check passed

ci/circleci Your tests passed on CircleCI!
Details

@smotornyuk smotornyuk deleted the 2844-optional-resource-url branch Dec 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.