mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-12-17 18:17:10 +00:00
Resovle merge conflicts with matser
This commit is contained in:
commit
d199c4c35f
3 changed files with 8 additions and 9 deletions
|
@ -4,12 +4,6 @@ repos:
|
|||
hooks:
|
||||
- id: black
|
||||
|
||||
# - repo: https://github.com/pycqa/isort
|
||||
# rev: 5.12.0
|
||||
# hooks:
|
||||
# - id: isort
|
||||
# name: isort (python)
|
||||
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.4.0
|
||||
hooks:
|
||||
|
|
|
@ -128,6 +128,9 @@ warn_unused_ignores = false
|
|||
[tool.black]
|
||||
line-length = 120
|
||||
|
||||
[tool.isort]
|
||||
profile = "black"
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
addopts = "--strict-markers"
|
||||
markers = [
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
# Standard Packages
|
||||
import asyncio
|
||||
import logging
|
||||
from typing import Dict, Optional, Union
|
||||
|
@ -175,6 +174,9 @@ def configure_content(
|
|||
content_index = ContentIndex()
|
||||
|
||||
success = True
|
||||
if t == None:
|
||||
t = state.SearchType.All
|
||||
|
||||
if t is not None and t in [type.value for type in state.SearchType]:
|
||||
t = state.SearchType(t)
|
||||
|
||||
|
@ -301,7 +303,7 @@ def configure_content(
|
|||
# Initialize Notion Search
|
||||
notion_config = NotionConfig.objects.filter(user=user).first()
|
||||
if (
|
||||
search_type == state.SearchType.All.value or search_type in state.SearchType.Notion.value
|
||||
search_type == state.SearchType.All.value or search_type == state.SearchType.Notion.value
|
||||
) and notion_config:
|
||||
logger.info("🔌 Setting up search for notion")
|
||||
text_search.setup(
|
||||
|
@ -314,7 +316,7 @@ def configure_content(
|
|||
)
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"🚨 Failed to setup GitHub: {e}", exc_info=True)
|
||||
logger.error(f"🚨 Failed to setup Notion: {e}", exc_info=True)
|
||||
success = False
|
||||
|
||||
# Invalidate Query Cache
|
||||
|
|
Loading…
Reference in a new issue