Skip to content
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

Merged
merged 3 commits into from
Nov 12, 2020
Merged

fix: restrict upcoming events on basis of ticket availability #7436

merged 3 commits into from
Nov 12, 2020

Conversation

maze-runnar
Copy link
Contributor

@maze-runnar maze-runnar commented Nov 12, 2020

Fixes fossasia/open-event-frontend#5110

Checklist

  • I have read the Contribution & Best practices Guide and my PR follows them.
  • My branch is up-to-date with the Upstream development branch.
  • The unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • All the functions created/modified in this PR contain relevant docstrings.

@@ -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)),
Copy link
Member

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

Copy link
Member

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

Copy link
Contributor Author

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

@@ -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)),
Copy link
Member

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

@iamareebjamal iamareebjamal merged commit 7fcc8a6 into fossasia:development Nov 12, 2020
@maze-runnar maze-runnar deleted the patch-6 branch November 12, 2020 13:06
@lgtm-com
Copy link
Contributor

lgtm-com bot commented Nov 12, 2020

This pull request introduces 1 alert when merging f40d246 into 8469770 - view on LGTM.com

new alerts:

  • 1 for Testing equality to None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Frontpage: Limit display of events based on the public ticket availability
2 participants