Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
a4d86496
Unverified
Commit
a4d86496
authored
Feb 28, 2024
by
takatost
Committed by
GitHub
Feb 28, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: notion extractor raise 'NoneType' object has no attribute 'curre… (#2608)
parent
90bdc85f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
notion_extractor.py
api/core/rag/extractor/notion_extractor.py
+1
-2
No files found.
api/core/rag/extractor/notion_extractor.py
View file @
a4d86496
...
@@ -4,7 +4,6 @@ from typing import Any, Optional
...
@@ -4,7 +4,6 @@ from typing import Any, Optional
import
requests
import
requests
from
flask
import
current_app
from
flask
import
current_app
from
flask_login
import
current_user
from
core.rag.extractor.extractor_base
import
BaseExtractor
from
core.rag.extractor.extractor_base
import
BaseExtractor
from
core.rag.models.document
import
Document
from
core.rag.models.document
import
Document
...
@@ -43,7 +42,7 @@ class NotionExtractor(BaseExtractor):
...
@@ -43,7 +42,7 @@ class NotionExtractor(BaseExtractor):
if
notion_access_token
:
if
notion_access_token
:
self
.
_notion_access_token
=
notion_access_token
self
.
_notion_access_token
=
notion_access_token
else
:
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
)
self
.
_notion_workspace_id
)
if
not
self
.
_notion_access_token
:
if
not
self
.
_notion_access_token
:
integration_token
=
current_app
.
config
.
get
(
'NOTION_INTEGRATION_TOKEN'
)
integration_token
=
current_app
.
config
.
get
(
'NOTION_INTEGRATION_TOKEN'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment