notion fix

This commit is contained in:
jyong 2025-08-06 15:11:37 +08:00
parent 05e96e56e5
commit 94a0fb6dc1
3 changed files with 6 additions and 6 deletions

View File

@ -226,9 +226,9 @@ class OnlineDocumentInfo(BaseModel):
Online document info
"""
workspace_id: str = Field(..., description="The workspace id")
workspace_name: str = Field(..., description="The workspace name")
workspace_icon: str = Field(..., description="The workspace icon")
workspace_id: Optional[str] = Field(None, description="The workspace id")
workspace_name: Optional[str] = Field(None, description="The workspace name")
workspace_icon: Optional[str] = Field(None, description="The workspace icon")
total: int = Field(..., description="The total number of documents")
pages: list[OnlineDocumentPage] = Field(..., description="The pages of the online document")

View File

@ -107,10 +107,10 @@ class OnlineDocumentInfo(BaseModel):
"""
provider: str
workspace_id: str
workspace_id: Optional[str] = None
page_id: str
page_type: str
icon: OnlineDocumentIcon
icon: Optional[OnlineDocumentIcon] = None
class WebsiteInfo(BaseModel):

View File

@ -1370,7 +1370,7 @@ class DocumentService:
)
return
db.session.add(dataset_process_rule)
db.session.commit()
db.session.flush()
lock_name = f"add_document_lock_dataset_id_{dataset.id}"
with redis_client.lock(lock_name, timeout=600):
position = DocumentService.get_documents_position(dataset.id)