mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-28 01:45:07 +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.")
|
||||
return
|
||||
|
||||
if model is None:
|
||||
model = SearchModels()
|
||||
|
||||
try:
|
||||
# Initialize Org Notes Search
|
||||
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.innerHTML = "Reinitializing...";
|
||||
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',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
|
Loading…
Reference in a new issue