mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-23 20:18:00 +01:00
mark reports as opened when claimed and unclaimed
This commit is contained in:
parent
44b004f9ec
commit
22bd05350d
1 changed files with 2 additions and 0 deletions
|
@ -39,12 +39,14 @@ defmodule Philomena.Reports.Report do
|
|||
change(report)
|
||||
|> validate_inclusion(:admin_id, [])
|
||||
|> put_change(:admin_id, user.id)
|
||||
|> put_change(:open, true)
|
||||
|> put_change(:state, "in_progress")
|
||||
end
|
||||
|
||||
def unclaim_changeset(report) do
|
||||
change(report)
|
||||
|> put_change(:admin_id, nil)
|
||||
|> put_change(:open, true)
|
||||
|> put_change(:state, "open")
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue