From e20ec698fa32686b1da75c500e4602699ea679e0 Mon Sep 17 00:00:00 2001 From: Michael Wan Date: Sun, 5 Mar 2023 10:37:11 +0800 Subject: [PATCH] footnote. Fix a config override bug --- src/SearchGPTService.py | 2 +- src/website/templates/base.html | 12 ++++++++++++ src/website/templates/index.html | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/SearchGPTService.py b/src/SearchGPTService.py index 9f402aa..9c74f3a 100644 --- a/src/SearchGPTService.py +++ b/src/SearchGPTService.py @@ -27,7 +27,7 @@ def overide_config_by_query_string(self, ui_overriden_config): if ui_overriden_config is None: return for key, value in ui_overriden_config.items(): - if value is not None: + if value is not None and value != '': # query_string is flattened (one level) while config.yaml is nested (two+ levels) # Any better way to handle this? if key == 'bing_search_subscription_key': diff --git a/src/website/templates/base.html b/src/website/templates/base.html index c020805..b1e1bec 100644 --- a/src/website/templates/base.html +++ b/src/website/templates/base.html @@ -26,6 +26,18 @@
{% block content %} {% endblock %}
+ + diff --git a/src/website/templates/index.html b/src/website/templates/index.html index cdf7ebe..2066c45 100644 --- a/src/website/templates/index.html +++ b/src/website/templates/index.html @@ -112,4 +112,5 @@

{{item['title'
+ {% endblock %}