Skip to content

Conversation

Copy link

Copilot AI commented Jan 3, 2026

The deepPopulate call in routes/dashboard.js referenced "group.competition.rule", but the Competition model has no rule field. The Rule model exists as a singleton document accessed globally via Rule.findOne({name:"DMC"}) throughout the application—it's not a relationship on competitions.

Changes

  • Removed "group.competition.rule" from the deepPopulate array in the dashboard route
// Before
.deepPopulate(["group","group.competition.puzzles","group.competition.rule",
    "group.competition.puzzles.problem","group.competition"])

// After
.deepPopulate(["group","group.competition.puzzles",
    "group.competition.puzzles.problem","group.competition"])

No code referenced this field, so removal has no functional impact.

Original prompt

what does rules doing here?


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

The Competition model doesn't have a 'rule' field. The Rule model is used globally throughout the application (accessed via Rule.findOne({name:"DMC"})) and is not linked to individual competitions. This reference was unnecessary and could cause confusion.

Co-authored-by: seyhani <21120274+seyhani@users.noreply.github.com>
Copilot AI changed the title [WIP] Clarify purpose of rules in context Remove non-existent competition.rule field from deepPopulate Jan 3, 2026
Copilot AI requested a review from seyhani January 3, 2026 18:44
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.

2 participants