DOI-USGS / DOI-USGS/sbtools

item_upsert never updates

Open
#239 0 comments 0 reactions 1 assignee Claimed by @dblodgett-usgs View on GitHub
bug
Dominant language
R
Stars
24
Forks
20
PR merge metrics
No merged PRs in 30d

Description

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

After logging in:
```r
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".

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.