Commit 52a37af6 authored by ThibG's avatar ThibG Committed by Nathan Ladd
Browse files

Fix dismissing an announcement twice raising an obscure error (#13124)

parent 0936da23
...@@ -11,7 +11,7 @@ class Api::V1::AnnouncementsController < Api::BaseController ...@@ -11,7 +11,7 @@ class Api::V1::AnnouncementsController < Api::BaseController
end end
def dismiss def dismiss
AnnouncementMute.create!(account: current_account, announcement: @announcement) AnnouncementMute.find_or_create_by!(account: current_account, announcement: @announcement)
render_empty render_empty
end end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment