Skip to content

Commit f576c77

Browse files
committed
PyPDF: Only save creation date
Some files do not have a ``moddate``, which confuses the LanceDB schema. This should be the last fix needed for the production vector store. Ref: AP-412
1 parent fee84bf commit f576c77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

willa/lcvendor/pypdf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def _purge_metadata(metadata: dict[str, Any]) -> dict[str, Any]:
111111
if k.startswith("/"):
112112
k = k[1:]
113113
k = k.lower()
114-
if k in ["creationdate", "moddate"]:
114+
if k == "creationdate":
115115
try:
116116
new_metadata[k] = datetime.strptime(
117117
v.replace("'", ""), "D:%Y%m%d%H%M%S%z"

0 commit comments

Comments
 (0)