From e845180ae7cd9046c3862afef06f03b4e6b3fee4 Mon Sep 17 00:00:00 2001 From: Bryan Brancotte <bryan.brancotte@pasteur.fr> Date: Fri, 30 Sep 2022 23:23:07 +0200 Subject: [PATCH] should not be needed anymore, commenting it --- autocomplete_multi_models/business_process.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/autocomplete_multi_models/business_process.py b/autocomplete_multi_models/business_process.py index e33e483..b86026a 100644 --- a/autocomplete_multi_models/business_process.py +++ b/autocomplete_multi_models/business_process.py @@ -44,16 +44,15 @@ def rebuild_index(): models.IndexedWord.objects.bulk_create(objects.values()) - -def clean_duplicate(): - models.IndexedWord.objects.annotate( - is_duplicate=Exists( - models.IndexedWord.objects.filter( - word__iexact=OuterRef('word'), - pk__gt=OuterRef('pk'), - ) - ) - ).filter(is_duplicate=True).delete() +# def clean_duplicate(): +# models.IndexedWord.objects.annotate( +# is_duplicate=Exists( +# models.IndexedWord.objects.filter( +# word__iexact=OuterRef('word'), +# pk__gt=OuterRef('pk'), +# ) +# ) +# ).filter(is_duplicate=True).delete() def add_instance_to_index(instance, field_names: List[str]): -- GitLab