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

th-downstream
ThibG 5 years ago committed by GitHub
parent d7da2bba02
commit c004399975

@ -11,7 +11,7 @@ class Api::V1::AnnouncementsController < Api::BaseController
end
def dismiss
AnnouncementMute.create!(account: current_account, announcement: @announcement)
AnnouncementMute.find_or_create_by!(account: current_account, announcement: @announcement)
render_empty
end

Loading…
Cancel
Save