Initialize the search.model field to SearchModels() and fix Reinitialize API call (#273)

This commit is contained in:
sabaimran 2023-07-03 11:32:44 -07:00 committed by GitHub
parent 61403138d5
commit 92d81d3b16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -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:

View file

@ -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',