mirror of
https://gitee.com/dify_ai/dify.git
synced 2024-11-30 02:08:37 +08:00
fix: notion extractor raise 'NoneType' object has no attribute 'curre… (#2608)
This commit is contained in:
parent
90bdc85f8c
commit
a4d86496e1
@ -4,7 +4,6 @@ from typing import Any, Optional
|
||||
|
||||
import requests
|
||||
from flask import current_app
|
||||
from flask_login import current_user
|
||||
|
||||
from core.rag.extractor.extractor_base import BaseExtractor
|
||||
from core.rag.models.document import Document
|
||||
@ -43,7 +42,7 @@ class NotionExtractor(BaseExtractor):
|
||||
if notion_access_token:
|
||||
self._notion_access_token = notion_access_token
|
||||
else:
|
||||
self._notion_access_token = self._get_access_token(current_user.current_tenant_id,
|
||||
self._notion_access_token = self._get_access_token(tenant_id,
|
||||
self._notion_workspace_id)
|
||||
if not self._notion_access_token:
|
||||
integration_token = current_app.config.get('NOTION_INTEGRATION_TOKEN')
|
||||
|
Loading…
Reference in New Issue
Block a user