scraperwiki.rename sets tool to null, breaking datasets #162

Closed
frabcus opened this Issue Apr 10, 2013 · 3 comments

Projects

None yet

1 participant

@frabcus
Contributor
frabcus commented Apr 10, 2013

I made a new dataset, and its tool has gotten reset to null :( Not sure what is doing it.

This means that nothing works - e.g. status endpoint.

Example: exvkfry

@frabcus
Contributor
frabcus commented Apr 10, 2013

Something is doing a PUT to datasets twice:

CheckUserRights GET /api/frabcus/datasets/exvkfry frabcus frabcus
GET /api/frabcus/datasets/exvkfry
- - - [Wed, 10 Apr 2013 23:41:00 GMT] "GET /api/frabcus/datasets/exvkfry HTTP/1.0" 200 156 "http://x.scraperwiki.com/dataset/exvkfry/settings" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31"
CheckUserRights PUT /api/frabcus/datasets/exvkfry frabcus frabcus
PUT /api/frabcus/datasets/exvkfry
- - - [Wed, 10 Apr 2013 23:41:00 GMT] "PUT /api/frabcus/datasets/exvkfry HTTP/1.0" 200 143 "http://x.scraperwiki.com/dataset/exvkfry/settings" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31"
POST /api/status/ from ident exvkfry
no tool
- - - [Wed, 10 Apr 2013 23:41:04 GMT] "POST /api/status HTTP/1.0" 500 41 "-" "python-requests/1.2.0 CPython/2.7.3 Linux/3.5.3-x86_64-linode27"
@frabcus
Contributor
frabcus commented Apr 10, 2013

Yeah, client is doing a PUT to the dataset with this payload:

__v: 0
_id: "XXXXXXXXXXXXXXXXXXXX"
box: "exvkfry"
displayName: "@frabcus's Twitter followers"
tool: null
user: "frabcus"
views: []
@frabcus
Contributor
frabcus commented Apr 11, 2013

It's definitely scraperwiki.rename - if I remove the calls to that in my tool's client-side Javascript, everything is hunky dory.

It's doing the PUT back with tool null during the backbone sync after rename. The GET request is correctly getting the tool - something in the clientside javascript is losing or clearing it.

@ehg ehg added a commit that closed this issue Apr 11, 2013
@ehg ehg should fix #162 b118653
@ehg ehg closed this in b118653 Apr 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment