Skip to content

Commit

Permalink
feat(notion): update doc (#2542)
Browse files Browse the repository at this point in the history
# 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):
  • Loading branch information
StanGirard committed May 4, 2024
1 parent 0dd1d12 commit 6b229a8
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions backend/modules/brain/integrations/Notion/Notion_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
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
Expand Down Expand Up @@ -58,9 +58,7 @@ def __init__(self, brain_id: str, user_id: str):

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 = {
Expand Down

0 comments on commit 6b229a8

Please sign in to comment.