diff --git a/src/file-processor/app/services/document_service.py b/src/file-processor/app/services/document_service.py index f19e73d..62792bb 100644 --- a/src/file-processor/app/services/document_service.py +++ b/src/file-processor/app/services/document_service.py @@ -162,7 +162,7 @@ class DocumentService: PyMongoError: If database operation fails """ # Calculate automatic attributes - file_bytes = file_bytes or self._read_file_bytes(file_path) + file_bytes = file_bytes if file_bytes is not None else self._read_file_bytes(file_path) file_hash = self._calculate_file_hash(file_bytes) file_type = self._detect_file_type(file_path) mime_type = self._detect_mime_type(file_bytes)