mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-16 17:55:26 -04:00
fix: _derive_title crashes on non-string content instead of returning Untitled (#1751)
This commit is contained in:
@@ -203,6 +203,8 @@ def _assert_pdf_marker_upload_owned(
|
||||
def _derive_title(content: str) -> str:
|
||||
"""Derive a title from document content."""
|
||||
import re
|
||||
if not isinstance(content, str):
|
||||
return "Untitled"
|
||||
text = content.strip()
|
||||
if not text:
|
||||
return "Untitled"
|
||||
|
||||
Reference in New Issue
Block a user