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

Add ability to open and close ticket sales #766

Merged
merged 11 commits into from
Jan 16, 2025

Conversation

aviupadhyayula
Copy link
Member

@aviupadhyayula aviupadhyayula commented Jan 3, 2025

Adds route for club leaders to suspend and resume ticket sales. If an event has its ticket sales paused, buyers can no longer view it via tickets or add them to cart. (Note that checkout initiation and completion is unaffected for now, as these components are going to be reworked for #758.)

Addresses #759.

(Note: when #762 is merged in, rebase this one to ticketing-v2.)

@aviupadhyayula aviupadhyayula requested a review from rm03 January 3, 2025 05:18
Comment on lines +2512 to +2518
for item in quantities:
if item.get("count", 0) <= 0:
return Response(
{"detail": "Ticket quantities must be positive", "success": False},
status=status.HTTP_400_BAD_REQUEST,
)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is unrelated to the PR. Just noticed that we weren't checking that quantities being added to the cart were positive.

@aviupadhyayula aviupadhyayula linked an issue Jan 3, 2025 that may be closed by this pull request
Copy link
Contributor

@Porcupine1 Porcupine1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid PR! LGTM

Base automatically changed from refactor-ticket-settings to ticketing-v2 January 4, 2025 02:21
Copy link

codecov bot commented Jan 16, 2025

Codecov Report

Attention: Patch coverage is 90.47619% with 2 lines in your changes missing coverage. Please review.

Project coverage is 72.08%. Comparing base (f41a07f) to head (04c6f16).
Report is 1 commits behind head on ticketing-v2.

Files with missing lines Patch % Lines
backend/clubs/views.py 89.47% 2 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff                @@
##           ticketing-v2     #766      +/-   ##
================================================
+ Coverage         72.03%   72.08%   +0.04%     
================================================
  Files                32       32              
  Lines              6977     6996      +19     
================================================
+ Hits               5026     5043      +17     
- Misses             1951     1953       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aviupadhyayula aviupadhyayula merged commit bf413bc into ticketing-v2 Jan 16, 2025
8 checks passed
@aviupadhyayula aviupadhyayula deleted the control-ticket-sales branch January 16, 2025 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Allow club leaders to open and close ticket sales
2 participants