diff --git a/retirement/models.py b/retirement/models.py index 6ae104d4..bb839831 100644 --- a/retirement/models.py +++ b/retirement/models.py @@ -59,7 +59,7 @@ class Meta: @property def reserved_seats(self): - return self.wait_queue_places.count() + return self.wait_queue_places.filter(available=True).count() toilet_gendered = models.BooleanField( null=True, @@ -340,6 +340,7 @@ def add_user_to_wait_queue(self, user): def get_wait_queue_place_reserved(self, user): return self.wait_queue_places.filter( + available=True, wait_queue_places_reserved__user=user ).order_by('create').first()