From 18a7b05b32811cf7b5cbcc5a971bed1b88aef8ab Mon Sep 17 00:00:00 2001 From: Emir Isman Date: Sun, 15 Oct 2023 22:06:36 +0200 Subject: [PATCH] Fix Photologue on Python 3.11 --- photologue/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/photologue/models.py b/photologue/models.py index 495d960..6d29ba7 100644 --- a/photologue/models.py +++ b/photologue/models.py @@ -213,7 +213,7 @@ def sample(self, count=None, public=True): photo_set = self.public() else: photo_set = self.photos.filter(sites__id=settings.SITE_ID) - return random.sample(set(photo_set), count) + return random.sample(list(set(photo_set)), count) def photo_count(self, public=True): """Return a count of all the photos in this gallery."""