From a30649b0a8cf3bb33586a1d6f0d60723220cc1ae Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Thu, 19 Mar 2020 17:38:51 -0700 Subject: [PATCH] Replace looping set.add with set.update. --- frontends/etiquette_flask/backend/endpoints/photo_endpoints.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontends/etiquette_flask/backend/endpoints/photo_endpoints.py b/frontends/etiquette_flask/backend/endpoints/photo_endpoints.py index 046b305..3f3fef0 100644 --- a/frontends/etiquette_flask/backend/endpoints/photo_endpoints.py +++ b/frontends/etiquette_flask/backend/endpoints/photo_endpoints.py @@ -408,8 +408,7 @@ def get_search_core(): # TAGS ON THIS PAGE total_tags = set() for photo in photos: - for tag in photo.get_tags(): - total_tags.add(tag) + total_tags.update(photo.get_tags()) total_tags = sorted(total_tags, key=lambda t: t.name) # PREV-NEXT PAGE URLS