Skip to content
Snippets Groups Projects
Commit e845180a authored by Bryan BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

should not be needed anymore, commenting it

parent 3f8a2cf7
No related branches found
No related tags found
No related merge requests found
......@@ -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]):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment