From 6b16a768a70d9a6e1fbe3ed6138f77f9ebfe0cf4 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Fri, 8 Mar 2024 03:08:03 +0000 Subject: [PATCH] Fix deletion script --- apiserver/scripts/delete-story.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apiserver/scripts/delete-story.py b/apiserver/scripts/delete-story.py index a8994fd..55205fa 100644 --- a/apiserver/scripts/delete-story.py +++ b/apiserver/scripts/delete-story.py @@ -1,6 +1,8 @@ import database import search import sys +import settings +import logging import json import requests @@ -21,7 +23,7 @@ def database_del_story(sid): def search_del_story(sid): try: - r = requests.delete(search.MEILI_URL + 'indexes/qotnews/documents/'+sid, timeout=2) + r = requests.delete(settings.MEILI_URL + 'indexes/qotnews/documents/'+sid, timeout=2) if r.status_code != 202: raise Exception('Bad response code ' + str(r.status_code)) return r.json()