mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-09 13:25:11 +00:00
Initialize the search.model field to SearchModels() and fix Reinitialize API call (#273)
This commit is contained in:
@@ -92,6 +92,9 @@ def configure_search(model: SearchModels, config: FullConfig, regenerate: bool,
|
|||||||
logger.warning("🚨 No Content or Search type is configured.")
|
logger.warning("🚨 No Content or Search type is configured.")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if model is None:
|
||||||
|
model = SearchModels()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Initialize Org Notes Search
|
# Initialize Org Notes Search
|
||||||
if (t == state.SearchType.Org or t == None) and config.content_type.org and config.search_type.asymmetric:
|
if (t == state.SearchType.Org or t == None) and config.content_type.org and config.search_type.asymmetric:
|
||||||
|
|||||||
@@ -253,7 +253,7 @@
|
|||||||
reinitialize.disabled = true;
|
reinitialize.disabled = true;
|
||||||
reinitialize.innerHTML = "Reinitializing...";
|
reinitialize.innerHTML = "Reinitializing...";
|
||||||
const csrfToken = document.cookie.split('; ').find(row => row.startsWith('csrftoken'))?.split('=')[1];
|
const csrfToken = document.cookie.split('; ').find(row => row.startsWith('csrftoken'))?.split('=')[1];
|
||||||
fetch('/api/update?&client=web?force=true', {
|
fetch('/api/update?&client=web&force=True', {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
|
|||||||
Reference in New Issue
Block a user