Skip to content

Fix issue #188: Create winners view V3 #189

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cld-vasconcelos
Copy link
Collaborator

This pull request fixes #188.

The issue has been successfully resolved based on the following implemented changes and their effects:

  1. The code implements the exact data structure requested in the original JSON specification through new GraphQL types (ContestWinnersType, ContestWinnerType, WinnerSubmissionType) that match the required schema.

  2. The query implementation in contest_winners correctly:

  • Filters contests to only those with winners using exclude(winners=None)
  • Orders results by voting_draw_end as required
  • Retrieves all necessary data including contest details, winner information, and submission details with vote counts
  • Properly formats the voting_draw_end date as an ISO string
  1. The comprehensive test suite verifies:
  • Correct data structure and field population
  • Proper handling of multiple winners per contest
  • Accurate vote counting
  • Correct date-based ordering
  • All required fields are present and properly formatted
  1. The implementation handles all edge cases including:
  • Multiple winners per contest
  • Vote counting for submissions
  • Proper relationship mapping between contests, winners, and their submissions
  • Null date handling

The code changes directly fulfill all requirements from the original issue description and the test suite provides evidence that the implementation works as intended. The data structure, ordering, and all required fields are present and functioning correctly.

Automatic fix generated by OpenHands 🙌

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.

Create winners view V3
2 participants