summaryrefslogtreecommitdiffstats
path: root/fatcat_scholar/schema.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2021-07-25 13:10:10 -0700
committerBryan Newbold <bnewbold@archive.org>2021-07-25 13:11:49 -0700
commit528804ad2e55983cf3e5e6659d8f46db0cab02b7 (patch)
tree801df5008ca69ff2c9de17025f238e32fbff61b5 /fatcat_scholar/schema.py
parent4b970481d9df4c495fb1df24238df7afbd52cf65 (diff)
downloadfatcat-scholar-528804ad2e55983cf3e5e6659d8f46db0cab02b7.tar.gz
fatcat-scholar-528804ad2e55983cf3e5e6659d8f46db0cab02b7.zip
refs transform: 1-index refs.index, not 0-index
This was not matching expectations/schema of downstream refs pipeline (cgraph), and wasn't matching documented schema. Note care required when checking if the index is set, to distinguish between '0' and 'None' values.
Diffstat (limited to 'fatcat_scholar/schema.py')
-rw-r--r--fatcat_scholar/schema.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/fatcat_scholar/schema.py b/fatcat_scholar/schema.py
index e6d0422..cae8c12 100644
--- a/fatcat_scholar/schema.py
+++ b/fatcat_scholar/schema.py
@@ -284,7 +284,7 @@ class RefStructured(BaseModel):
work_ident: Optional[str]
release_stage: Optional[str]
release_year: Optional[int]
- index: Optional[int]
+ index: Optional[int] # 1-indexed
key: Optional[str]
locator: Optional[str]
target_release_id: Optional[str]