From 5325ea57d156b898a45ff9992d5d064bb4db40f6 Mon Sep 17 00:00:00 2001 From: Samuel Clay Date: Thu, 29 Apr 2021 10:08:01 -0400 Subject: [PATCH] Don't delete search stories without doc type on ES 1.7. --- apps/search/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/search/models.py b/apps/search/models.py index c411cd1e3..c89936e85 100644 --- a/apps/search/models.py +++ b/apps/search/models.py @@ -301,8 +301,8 @@ class SearchStory: def remove(cls, story_hash): try: cls.ES().delete(index=cls.index_name(), id=story_hash, doc_type=cls.doc_type()) - except elasticsearch.exceptions.NotFoundError as e: - cls.ES().delete(index=cls.index_name(), id=story_hash) + # except elasticsearch.exceptions.NotFoundError as e: + # cls.ES().delete(index=cls.index_name(), id=story_hash) except elasticsearch.exceptions.NotFoundError as e: logging.debug(f" ***> ~FRNo search server available for story deletion: {e}")