[backend/core] Fix polls originating from masto-api
This commit is contained in:
parent
32a4875162
commit
fe7d85fa91
1 changed files with 1 additions and 1 deletions
|
@ -209,7 +209,7 @@ public class NoteService(
|
|||
poll.UserHost = note.UserHost;
|
||||
poll.NoteVisibility = note.Visibility;
|
||||
|
||||
if (poll.Votes.Count != poll.Choices.Count)
|
||||
if (poll.Votes == null! || poll.Votes.Count != poll.Choices.Count)
|
||||
poll.Votes = poll.Choices.Select(_ => 0).ToList();
|
||||
|
||||
await db.AddAsync(poll);
|
||||
|
|
Loading…
Add table
Reference in a new issue