From 3530b625d9e6a3650edba39643b26a2fb236fe77 Mon Sep 17 00:00:00 2001 From: Sean Engelhardt Date: Mon, 11 Nov 2019 12:36:54 +0100 Subject: [PATCH] Remove sorting poll option weight Fixes a bug where entered votes did not match to the order of poll options fixes #5125 --- .../repositories/assignments/assignment-repository.service.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/client/src/app/core/repositories/assignments/assignment-repository.service.ts b/client/src/app/core/repositories/assignments/assignment-repository.service.ts index 77b234da2..dea62667b 100644 --- a/client/src/app/core/repositories/assignments/assignment-repository.service.ts +++ b/client/src/app/core/repositories/assignments/assignment-repository.service.ts @@ -219,8 +219,6 @@ export class AssignmentRepositoryService extends BaseIsAgendaItemAndListOfSpeake * @param originalPoll the original poll */ public async updateVotes(poll: Partial, originalPoll: ViewAssignmentPoll): Promise { - poll.options.sort((a, b) => a.weight - b.weight); - const votes = poll.options.map(option => { const voteObject = {}; for (const vote of option.votes) {