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

item_upsert never updates #239

Open
aappling-usgs opened this issue Jul 6, 2017 · 0 comments
Open

item_upsert never updates #239

aappling-usgs opened this issue Jul 6, 2017 · 0 comments
Assignees
Labels

Comments

@aappling-usgs
Copy link
Contributor

I can't find a way to call item_upsert such that it updates rather than creates a new item.

After logging in:

test_item_1 <- item_upsert(title="books1") 
test_item_2 <- item_upsert(title="books1") 
test_item_1$id == test_item_2$id
## [1] FALSE
test_item_3 <- item_upsert(title="books2")
test_item_4 <- item_upsert(title="books2", info=list(contacts = list(list(name = "Suzy"))))
test_item_3$id == test_item_4$id
## [1] FALSE

I had expected the tests to yield TRUE - i.e., item_upsert should update rather than create an existing item if the titles match. The two calls to item_upsert in the Examples section of the help document also produce two distinct items, despite the claim that the second call "updates this time".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants