Skip to content

Commit

Permalink
fix: delete announcement test
Browse files Browse the repository at this point in the history
  • Loading branch information
JoaoCoelho2003 committed Sep 24, 2024
1 parent 424175a commit 040ee69
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/atomic/organizations.ex
Original file line number Diff line number Diff line change
Expand Up @@ -629,8 +629,13 @@ defmodule Atomic.Organizations do
|> Ecto.Multi.delete(:announcement, announcement)
|> Ecto.Multi.delete(:post, Repo.get!(Post, announcement.post_id))
|> Repo.transaction()
|> case do
{:ok, _changes} -> {:ok, announcement}
{:error, _step, reason, _changes} -> {:error, reason}
end
end


@doc """
Returns an `%Ecto.Changeset{}` for tracking announcement changes.
Expand Down

0 comments on commit 040ee69

Please sign in to comment.