IQSS / dataverse-client-r

R Client for Dataverse Repositories
https://iqss.github.io/dataverse-client-r
60 stars 24 forks source link

Fix add_dataset_file() to in 0.3.10 #118

Closed Danny-dK closed 2 years ago

Danny-dK commented 2 years ago

Change bod2 from list() to list(forceReplace = force) . The list() resulted in jsondata being run with '[]' which is not accepted within R anymore (unsure where the issue resulted from, could be either from httr, curl). The list(forceReplace = force) was already used at update_dataset_file(). Other option would be to use NULL instead of the list().

References https://github.com/IQSS/dataverse-client-r/issues/116#issuecomment-1084251443

(note: there were some issues with closing and renewing or changing base of pull request (automatically closed it), hope everything is good now)

kuriwaki commented 2 years ago

Thanks @Danny-dK -- this works with my example. Waiting on a few more tests and I'll merge soon.