nf-osi / nfportalutils

Utilities for NF Portal project and data management
https://nf-osi.github.io/nfportalutils/
MIT License
2 stars 2 forks source link

Handle different versioning logic for items in a dataset vs items in a dataset collection #112

Closed anngvu closed 1 year ago

anngvu commented 1 year ago

Datasets and dataset collections are both collections. However, one difference is that while it is not possible for a dataset item to point to a non-existing item version, it actually is for a dataset collection items because there are "draft" datasets (while there are no "draft" files).

anngvu commented 1 year ago

The currentVersion property for a dataset actually refers to the Draft version. Therefore the "real" latest version of a dataset is currentVersion - 1 (unless there is only a draft version of 1).