From a3e1f45a0e35fbe76071d5344bed600d388aa234 Mon Sep 17 00:00:00 2001 From: sarayourfriend Date: Wed, 12 Jun 2024 15:20:41 +1000 Subject: [PATCH] Fix trim and deduplicate tags deduplication --- catalog/dags/maintenance/trim_and_deduplicate_tags.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalog/dags/maintenance/trim_and_deduplicate_tags.py b/catalog/dags/maintenance/trim_and_deduplicate_tags.py index 5eee080c551..23e971593fb 100644 --- a/catalog/dags/maintenance/trim_and_deduplicate_tags.py +++ b/catalog/dags/maintenance/trim_and_deduplicate_tags.py @@ -69,7 +69,7 @@ def trim_and_deduplicate_tags(): ) ) FROM ( - SELECT DISTINCT ON (tag->>'name', tag->'provider') + SELECT DISTINCT ON (trimmed_name, tag->'provider') trim(tag->>'name') trimmed_name, tag FROM jsonb_array_elements({media_type}.tags || '[]'::jsonb) tag