summaryrefslogtreecommitdiffstats
path: root/fatcat_scholar/schema.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-10-16 18:16:21 -0700
committerBryan Newbold <bnewbold@archive.org>2020-10-16 18:16:21 -0700
commit8174a8f627ebba6f1595b44fd48ceebdde97e107 (patch)
treef04b61da1fc8df9a6c9919a4f572bb4b98010d5b /fatcat_scholar/schema.py
parentd9a8c44fdddacd09a2a14139ae673ad386232f3b (diff)
downloadfatcat-scholar-8174a8f627ebba6f1595b44fd48ceebdde97e107.tar.gz
fatcat-scholar-8174a8f627ebba6f1595b44fd48ceebdde97e107.zip
schema: optional 'fetched' field on bundles
Diffstat (limited to 'fatcat_scholar/schema.py')
-rw-r--r--fatcat_scholar/schema.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/fatcat_scholar/schema.py b/fatcat_scholar/schema.py
index db3b668..5637e0a 100644
--- a/fatcat_scholar/schema.py
+++ b/fatcat_scholar/schema.py
@@ -34,11 +34,13 @@ class IntermediateBundle(BaseModel):
pdftotext_fulltext: Optional[Dict[str, Any]]
pdf_meta: Optional[Dict[str, Any]]
sim_fulltext: Optional[Dict[str, Any]]
+ fetched: Optional[datetime.datetime]
class Config:
arbitrary_types_allowed = True
json_encoders = {
ReleaseEntity: lambda re: entity_to_dict(re),
+ datetime.datetime: lambda dt: dt.isoformat(),
}