Skip to content

item_upsert never updates #239

@aappling-usgs

Description

@aappling-usgs

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".

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions