Skip to content

Commit

Permalink
Hide erm photos
Browse files Browse the repository at this point in the history
  • Loading branch information
MaertHaekkinen committed Nov 23, 2023
1 parent dfb7250 commit 49ceaee
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ajapaik/ajapaik/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,14 @@ def get_album_type(self):
return Album.TYPE_CHOICES[self.atype][1]


# Ugly hack to exclude specific photos for some whiny individuals
class PhotoManager(EstimatedCountManager):
def get_queryset(self):
return super(PhotoManager, self).get_queryset().exclude(source_key__startswith="ERM Fk 2932")


class Photo(Model):
objects = EstimatedCountManager()
objects = PhotoManager()
bulk = BulkUpdateManager()

# Removed sorl ImageField because of https://github.com/mariocesar/sorl-thumbnail/issues/295
Expand Down

0 comments on commit 49ceaee

Please sign in to comment.