A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
If override_date is provided, coerce it into a datetime
Trenton Hde98d748a954
diff --git a/src/documents/tasks.py b/src/documents/tasks.pyindex 667c3d9df..f5bad665a 100644--- a/src/documents/tasks.py+++ b/src/documents/tasks.py@@ -3,6 +3,7 @@ import loggingimport osimport shutilimport uuid+from datetime import datetimefrom pathlib import Pathfrom typing import Type@@ -98,6 +99,14 @@ def consume_file(path = Path(path).resolve()+ # Celery converts this to a string, but everything expects a datetime+ # Long term solution is to not use JSON for the serializer but pickle instead+ if override_created is not None and isinstance(override_created, str):+ try:+ override_created = datetime.fromisoformat(override_created)+ except Exception:+ pass+# check for separators in current documentif settings.CONSUMER_ENABLE_BARCODES: