mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-20 06:37:59 +01:00
simplify
This commit is contained in:
parent
accc9b5304
commit
00373f44b2
3 changed files with 3 additions and 3 deletions
|
@ -104,7 +104,7 @@ defmodule Philomena.DnpEntries do
|
|||
|
||||
def count_dnp_entries() do
|
||||
DnpEntry
|
||||
|> where([ul], ul.aasm_state in [ "requested", "claimed", "acknowledged" ])
|
||||
|> where([dnp], dnp.aasm_state in [ "requested", "claimed", "acknowledged" ])
|
||||
|> Repo.aggregate(:count, :id)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -117,7 +117,7 @@ defmodule Philomena.DuplicateReports do
|
|||
|
||||
def count_duplicate_reports() do
|
||||
DuplicateReport
|
||||
|> where([dr], dr.state == "open")
|
||||
|> where(state: "open")
|
||||
|> Repo.aggregate(:count, :id)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -107,7 +107,7 @@ defmodule Philomena.UserLinks do
|
|||
|
||||
def count_user_links() do
|
||||
UserLink
|
||||
|> where([ul], ul.aasm_state == "unverified")
|
||||
|> where(aasm_state: "unverified")
|
||||
|> Repo.aggregate(:count, :id)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue