Skip to content

Commit

Permalink
Allow 'allowed_venues' to be set on attendee content
Browse files Browse the repository at this point in the history
Sometimes it's not really attendee content (e.g. karaoke)

Closes #1556
  • Loading branch information
SamLR committed May 19, 2024
1 parent d27107d commit 8ce21fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions models/cfp.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,10 +646,10 @@ def has_ticket(self) -> bool:
return admission_tickets > 0 or self.user.will_have_ticket

def get_allowed_venues(self) -> list["Venue"]:
if self.user_scheduled:
return Venue.query.filter(~Venue.scheduled_content_only).all()
elif self.allowed_venues:
if self.allowed_venues:
return self.allowed_venues
elif self.user_scheduled:
return Venue.query.filter(~Venue.scheduled_content_only).all()
else:
return Venue.query.filter(Venue.default_for_types.any(self.type)).all()

Expand Down

0 comments on commit 8ce21fa

Please sign in to comment.