From 5843992af1255185b07e7701da3328029eeabf2d Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Thu, 18 Aug 2022 01:06:39 +0000 Subject: [PATCH] dashboard(): Rework links_f_pinned_colls var to be set --- server/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/app.py b/server/app.py index 43763b6..a764c7b 100644 --- a/server/app.py +++ b/server/app.py @@ -230,7 +230,7 @@ def dashboard(): pinned_collections: Iterable[MediaCollection] = orm.select( m for m in MediaCollection if m.pinned and not m.ignored ).order_by(MediaCollection.release_date, MediaCollection.title, MediaCollection.id) - links_from_pinned_collections: List[MediaCollectionLink] = list() + links_from_pinned_collections = set[MediaCollectionLink]() for coll in pinned_collections: next_link = coll.next_episode if ( @@ -238,7 +238,7 @@ def dashboard(): and next_link.element not in already_listed and next_link.element.can_considered ): - links_from_pinned_collections.append(next_link) + links_from_pinned_collections.add(next_link) already_listed.add(next_link.element) if len(links_from_pinned_collections) >= pinned_limit: break