feat(notion): update doc (#2542)

# Description

Please include a summary of the changes and the related issue. Please
also include relevant motivation and context.

## Checklist before requesting a review

Please delete options that are not relevant.

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented hard-to-understand areas
- [ ] I have ideally added tests that prove my fix is effective or that
my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged

## Screenshots (if appropriate):
This commit is contained in:
Stan Girard 2024-05-04 20:16:24 +02:00 committed by GitHub
parent 0dd1d12e6a
commit 6b229a8fc3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,14 +13,14 @@ from modules.brain.repository.integration_brains import Integration, Integration
from modules.knowledge.dto.inputs import CreateKnowledgeProperties
from modules.knowledge.repository.knowledge_interface import KnowledgeInterface
from modules.knowledge.service.knowledge_service import KnowledgeService
from pydantic import BaseModel
from modules.upload.service.upload_file import upload_file_storage
from pydantic import BaseModel
logger = get_logger(__name__)
class NotionPage(BaseModel):
"""Represents a Notion Page object"""
"""Represents a Notion Page object to be used in the NotionConnector class"""
id: str
created_time: str
@ -58,9 +58,7 @@ class NotionConnector(IntegrationBrain, Integration):
def _load_credentials(self) -> dict[str, str]:
"""Load the Notion credentials"""
self.integration_details = self.get_integration_brain(
self.brain_id
)
self.integration_details = self.get_integration_brain(self.brain_id)
if self.credentials is None:
logger.info("Loading Notion credentials")
self.integration_details.credentials = {