-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: restrict upcoming events on basis of ticket availability #7436
Conversation
app/api/events.py
Outdated
@@ -850,6 +850,7 @@ def query(self, view_kwargs): | |||
Event.ends_at > current_time, | |||
Event.state == 'published', | |||
Event.privacy == 'public', | |||
Event.tickets.any(and_(Ticket.deleted_at == None, Ticket.price > 0, Ticket.is_hidden == False)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Promoted events should be shown anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also price was an example. I don't think price is a requirement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also price was an example. I don't think price is a requirement
ok
app/api/events.py
Outdated
@@ -859,6 +858,7 @@ def query(self, view_kwargs): | |||
Event.event_type_id != None, | |||
Event.event_topic_id != None, | |||
Event.event_sub_topic_id != None, | |||
Event.tickets.any(and_(Ticket.deleted_at == None, Ticket.price > 0, Ticket.is_hidden == False)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Read my previous comment about price
This pull request introduces 1 alert when merging f40d246 into 8469770 - view on LGTM.com new alerts:
|
Fixes fossasia/open-event-frontend#5110
Checklist
development
branch.