Skip to content

Fix issue #186: Create winners view V2 #187

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 #186.

The issue has been successfully resolved based on the following evidence:

  1. The implementation exactly matches the requested JSON structure from the issue description, with all required fields (title, description, prize, voting_draw_end, winners with nested submission and picture data)

  2. The query correctly filters for contests with winners using Contest.objects.filter(winners__isnull=False) and orders them by voting_draw_end as required

  3. The implementation handles all key requirements:

  • Only returns contests that have at least one winner (via the filter and checking winners list)
  • Includes complete winner information including first/last name
  • Includes the winning submission with picture details and vote count
  • Orders results by contest end date
  • Handles null prizes by converting to empty string
  1. The comprehensive test suite validates:
  • Correct data structure
  • Proper ordering
  • Vote counting
  • Multiple contests and winners
  • All required fields are present and properly formatted
  1. The code is properly organized with clear type definitions and separation of concerns between queries and types

The changes provide a complete, working implementation that fulfills all requirements from the original issue description, with proper testing and type safety through GraphQL types.

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 V2
2 participants