Repository navigation
Conversation
- finalize_round: use timezone-aware now() like the rest of rdb.py; datetime.utcnow() is deprecated on Python 3.12+. - test: import through the two-step checked import (#510); the one-step call now returns 400 without a check_token. Refs #462, #491 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
finalize_round now writes close_date, so finalizing a cancelled round overwrote its cancel date and relabelled it finalized, and finalizing twice rewrote close_date and logged a second entry. Refuse both with InvalidAction, add a docstring stating the #462 scope (no threshold, no results summary), and test both refusals. Refs #462, #491 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#491 dropped it because finalize_round no longer uses it, but the follow-up for #644 uses it in finalize_campaign. The two branches merge without a conflict and then fail with a NameError (500 on campaign finalize). Keeping the import leaves the import block as on master. Refs #491, #644 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The round's Finalize button (
POST /admin/round/<id>/finalize) setstatusdirectly on the round, soclose_datestayed empty and no audit entry was written (#462).This is @userAdityaa's change from #491. Their commit is kept as is, rebased onto current master (the only conflict was where the new method goes). Thank you for the fix and for the regression test.
Changes
CoordinatorDAO.finalize_roundsetsclose_dateandstatusand writes afinalize_roundaudit entry. The endpoint calls it. As agreed on [Bug]:finalize_roundendpoint bypasses DAO finalization logic (missing close_date, audit log) #462, it computes no threshold and builds no results summary.now(), like the rest ofrdb.py, instead of the deprecatedutcnow();close_dateand logged twice.Notes
close_date. Only the display reads it, and it can't be backfilled, because no audit entry was written then.finalize_roundis also whatfinalize_rating_roundlogs.Tests
test_finalize_round_sets_close_date_and_logs_actioncovers the close date, exactly one audit entry, the refused second finalize and the refused cancelled round. It fails without the change. Full suite: 172 passed, 3 xfailed.Closes #462. Supersedes #491.
Written by Claude (Claude Code) on behalf of @lgelauff.
🤖 Generated with Claude Code