ropensci / EML

Ecological Metadata Language interface for R: synthesis and integration of heterogenous data
https://docs.ropensci.org/EML
Other
97 stars 33 forks source link

set_attributes should not allow id to be set as NA #322

Closed ianbrunjes closed 3 years ago

ianbrunjes commented 3 years ago

This change got buried in a stashed commit during my last PR, but since set_attributes now processes the id field, it would ideally disallow NA values from being set on it.

With that said, it might make sense for set_attributes to set the id with whatever value it was passed (NA or otherwise) and maybe should not be the responsibility of this function to coerce an NA to NULL for this field,- but my opinion is that it is appropriate and useful to integrate that in here, since an NA value for id would never be desirable or valid.

cboettig commented 3 years ago

makes sense, thanks for the PR!