[backend] Code cleanup

This commit is contained in:
Laura Hausmann 2024-03-07 21:26:12 +01:00
parent 57ac4750ad
commit 2c529495f3
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -283,7 +283,7 @@ public class NoteService(
{ {
await db.PollVotes.Where(p => p.Note == note).ExecuteDeleteAsync(); await db.PollVotes.Where(p => p.Note == note).ExecuteDeleteAsync();
note.Poll.Choices = poll.Choices; note.Poll.Choices = poll.Choices;
note.Poll.Votes = poll.Choices.Select(p => 0).ToList(); note.Poll.Votes = poll.Choices.Select(_ => 0).ToList();
note.Poll.Multiple = poll.Multiple; note.Poll.Multiple = poll.Multiple;
db.Update(note.Poll); db.Update(note.Poll);
} }