mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-30 19:03:01 +01:00
Initialize the search.model field to SearchModels() and fix Reinitialize API call (#273)
This commit is contained in:
parent
61403138d5
commit
92d81d3b16
2 changed files with 4 additions and 1 deletions
|
@ -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',
|
||||||
|
|
Loading…
Reference in a new issue