Don't allow an exception when trying to parse a date cause complete failure

This commit is contained in:
Trenton H
2022-11-17 13:37:37 -08:00
parent 35652c1132
commit cdfcbff529
2 changed files with 7 additions and 2 deletions

View File

@@ -444,7 +444,12 @@ class Consumer(LoggingMixin):
return document
def _store(self, text, date, mime_type) -> Document:
def _store(
self,
text: str,
date: Optional[datetime.datetime],
mime_type: str,
) -> Document:
# If someone gave us the original filename, use it instead of doc.