From 4727d34eb6355a9f607d062bc9e764fc4b8403b2 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Fri, 14 Aug 2020 03:56:47 +0000 Subject: [PATCH] Delete displayed-attributes when init search --- apiserver/search.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apiserver/search.py b/apiserver/search.py index e747bbd..79e2193 100644 --- a/apiserver/search.py +++ b/apiserver/search.py @@ -40,6 +40,10 @@ def update_attributes(): if r.status_code != 202: raise Exception('Bad response code ' + str(r.status_code)) return r.json() + r = requests.delete(MEILI_URL + 'indexes/qotnews/settings/displayed-attributes', timeout=2) + if r.status_code != 202: + raise Exception('Bad response code ' + str(r.status_code)) + return r.json() except KeyboardInterrupt: raise except BaseException as e: