Description:
The finalize_round endpoint at admin_endpoints.py sets rnd.status = FINALIZED_STATUS directly on the ORM object instead of calling the proper DAO methods (finalize_rating_round or finalize_ranking_round). This means:
close_date is never set on the round
- Update status to finalized
- No audit log entry is created
Steps to Reproduce:
- Create a campaign, add a round, activate it, and complete all voting
- Finalize the round via the endpoint
- Check the round's
close_date in the database, it is NULL
- Check the audit log, no
finalize_round entry exists
Expected Behavior
Finalizing a round should perform all required finalization actions, including:
- Set
close_date to the current timestamp
- Create an audit log entry for the finalization action
- For ranking rounds: create a
RoundResultsSummary
- For rating rounds: store the
final_threshold in the configuration
Actual Behavior
Only the status field is changed. All other finalization side-effects are skipped.
Description:
The finalize_round endpoint at
admin_endpoints.pysetsrnd.status = FINALIZED_STATUSdirectly on the ORM object instead of calling the proper DAO methods (finalize_rating_round or finalize_ranking_round). This means:close_dateis never set on the roundSteps to Reproduce:
close_datein the database, it is NULLfinalize_roundentry existsExpected Behavior
Finalizing a round should perform all required finalization actions, including:
close_dateto the current timestampRoundResultsSummaryfinal_thresholdin the configurationActual Behavior
Only the status field is changed. All other finalization side-effects are skipped.