Skip to content

Conversation

devogs
Copy link
Owner

@devogs devogs commented Sep 8, 2025

This pull request addresses the bug that allowed users to book places in competitions that have already taken place. The original purchasePlaces function did not check the competition's date, allowing for bookings to be made after the event has passed. This fix implements the necessary validation to ensure that bookings can only be made for future competitions.

Changes Made:

Date Validation: The purchasePlaces function has been modified to compare the competition's date with the current date and time.

User Feedback: If a user attempts to book a place in a past competition, a clear error message is flashed to the screen to inform them of the issue.

No Deductions: Points are not deducted, and competition places are not updated if the booking is invalid.

Verification:

Manual Test: I manually tested the booking process for a competition with a past date. The application now correctly displays the error message and prevents the booking from being processed.

Automated Test: The automated test for this bug now passes, confirming that the fix is implemented correctly and the application behaves as expected.

@devogs devogs merged commit 62e4df3 into master Sep 8, 2025
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.

1 participant