Skip to content

Commit

Permalink
Do not try retrieve an unconfigured core content type in Config GUI
Browse files Browse the repository at this point in the history
Previous behavior was resulting in a null reference error. As key for
the core content/search type was not present in current config

Fallback to using default config for unconfigured core content type
instead

See #165 for details
  • Loading branch information
debanjum committed Mar 2, 2023
1 parent 1ae4016 commit b6dbe4d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/khoj/interface/desktop/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ def __init__(self, config_file: Path):
# Add Settings Panels for each Search Type to Configure Window Layout
self.search_settings_panels = []
for search_type in SearchType:
current_content_config = self.current_config["content-type"][search_type] or self.get_default_config(
search_type=search_type
)
current_content_config = self.current_config["content-type"].get(
search_type, None
) or self.get_default_config(search_type=search_type)
self.search_settings_panels += [self.add_settings_panel(current_content_config, search_type)]

# Add Conversation Processor Panel to Configure Screen
Expand Down

0 comments on commit b6dbe4d

Please sign in to comment.