Skip to content

Commit

Permalink
Merge pull request #226 from emirisman/master
Browse files Browse the repository at this point in the history
Fix Photologue on Python 3.11
  • Loading branch information
richardbarran authored Oct 23, 2023
2 parents 95c8112 + 18a7b05 commit 743c2e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion photologue/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down

0 comments on commit 743c2e3

Please sign in to comment.