From 978529bce9831a180af322d6156feaeb9308b460 Mon Sep 17 00:00:00 2001 From: ffont Date: Fri, 15 Dec 2023 12:14:28 +0100 Subject: [PATCH] Use set instead of list --- general/management/commands/report_index_statuses.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/general/management/commands/report_index_statuses.py b/general/management/commands/report_index_statuses.py index b3e582fb1..1a64923e7 100644 --- a/general/management/commands/report_index_statuses.py +++ b/general/management/commands/report_index_statuses.py @@ -60,7 +60,7 @@ def handle(self, *args, **options): console_logger.info("Getting freesound db data...") # Get all moderated and processed sound ids queryset = Sound.objects.filter(processing_state='OK', moderation_state='OK').order_by('id').only("id") - fs_mp = [sound.id for sound in queryset] + fs_mp = set([sound.id for sound in queryset]) # Get ell moderated, processed and analysed sounds sound_ids_analyzed_with_analyzer_ok = \ list(SoundAnalysis.objects.filter(analyzer=settings.FREESOUND_ESSENTIA_EXTRACTOR_NAME, analysis_status="OK")