Fix removing list with antenna
This commit is contained in:
parent
ae2452abea
commit
8f8e0ec88c
3 changed files with 3 additions and 0 deletions
|
@ -31,6 +31,7 @@ class Api::V1::ListsController < Api::BaseController
|
|||
end
|
||||
|
||||
def destroy
|
||||
raise Mastodon::ValidationError, I18n.t('antennas.errors.remove_list_with_antenna') if Antenna.where(list_id: @list.id).any?
|
||||
@list.destroy!
|
||||
render_empty
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue