Poll View: Always return voters_count
.
This commit is contained in:
parent
ba3f3a5a56
commit
1cfc3278c0
2 changed files with 2 additions and 2 deletions
|
@ -19,7 +19,7 @@ def render("show.json", %{object: object, multiple: multiple, options: options}
|
|||
expired: expired,
|
||||
multiple: multiple,
|
||||
votes_count: votes_count,
|
||||
voters_count: (multiple || nil) && voters_count(object),
|
||||
voters_count: voters_count(object),
|
||||
options: options,
|
||||
voted: voted?(params),
|
||||
emojis: Pleroma.Web.MastodonAPI.StatusView.build_emojis(object.data["emoji"])
|
||||
|
|
|
@ -44,7 +44,7 @@ test "renders a poll" do
|
|||
],
|
||||
voted: false,
|
||||
votes_count: 0,
|
||||
voters_count: nil
|
||||
voters_count: 0
|
||||
}
|
||||
|
||||
result = PollView.render("show.json", %{object: object})
|
||||
|
|
Loading…
Reference in a new issue