-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Resource URL gets changed to ___ #5031
Comments
I bisected to find the cause: ea4ceb4
|
davidread
pushed a commit
that referenced
this issue
Oct 18, 2019
Fixes #5031 werkzeug upgrade 0.14 to 0.15 means that when you submit the resource form with a resource url (not an upload), and the uploader is enabled, then the 'upload' parameter value changes from being u'' to: FileStorage(filename=u''). This half-confused ResourceUpload into thinking that it should upload something and it stored the url as '___' (!). This is fixed by essentially testing bool(resource['upload']) because bool(FileStorage(filename=u'')) == False. I was unable to test this using webtest - it didn't submit the form like my real browser does. So I just add a test for ResourceUpload that shows the issue and prevents it regressing in future.
5 tasks
amercader
added a commit
that referenced
this issue
Jan 10, 2020
amercader
added a commit
that referenced
this issue
Jan 10, 2020
amercader
added a commit
that referenced
this issue
Jan 10, 2020
amercader
added a commit
that referenced
this issue
Jan 10, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
CKAN Version if known (or site URL)
latest master
The probem
When I create or edit a resource using the web form, whatever I set the resource.url to be, it gets saved as something like this:
http://myckansite.com/dataset/713c8c32-cbd8-46ce-90fb-86de1f0811d2/resource/59c0e90c-11e2-4d7f-af43-e098660745dc/download/___
(!)It shouldn't change it. And the URL it sets it to gives a 404.
The text was updated successfully, but these errors were encountered: