In competitions/management/commands/update_competition_states.py there is a function Command.set_permissions which contains the logic of giving participants permission to view all qualified entries during the timespan of which voting is enabled on the relevant Competition. This logic should be moved closer to the objects.
Justification
With the current logic, permissions are not given when, say, the vote end time of a Competition is extended after voting is completed.
Proposed Changes
In
competitions/management/commands/update_competition_states.py
there is a functionCommand.set_permissions
which contains the logic of giving participants permission to view all qualified entries during the timespan of which voting is enabled on the relevant Competition. This logic should be moved closer to the objects.Justification
With the current logic, permissions are not given when, say, the vote end time of a Competition is extended after voting is completed.