mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-02-17 11:04:22 +01:00
correctly count user links
This commit is contained in:
parent
0d1ae1e436
commit
2c1725f20a
1 changed files with 1 additions and 1 deletions
|
@ -149,7 +149,7 @@ defmodule Philomena.UserLinks do
|
|||
def count_user_links(user) do
|
||||
if Canada.Can.can?(user, :index, UserLink) do
|
||||
UserLink
|
||||
|> where(aasm_state: "unverified")
|
||||
|> where([ul], ul.aasm_state in ^["unverified", "link_verified", "contacted"])
|
||||
|> Repo.aggregate(:count, :id)
|
||||
else
|
||||
nil
|
||||
|
|
Loading…
Reference in a new issue