Remove checks with removing list related to antenna
This commit is contained in:
parent
86c63d2dbb
commit
b65a022ac3
3 changed files with 2 additions and 3 deletions
|
@ -31,7 +31,8 @@ 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?
|
||||
antenna = Antenna.find_by(list_id: @list.id)
|
||||
antenna.update!(list_id: 0) if antenna.present?
|
||||
|
||||
@list.destroy!
|
||||
render_empty
|
||||
|
|
|
@ -1063,7 +1063,6 @@ en:
|
|||
invalid_list_owner: This list is not yours
|
||||
over_limit: You have exceeded the limit of %{limit} antennas
|
||||
over_stl_limit: You have exceeded the limit of %{limit} stl antennas
|
||||
remove_list_with_antenna: Cannot remove list because this list is related to antenna.
|
||||
index:
|
||||
contexts: Antennas in %{contexts}
|
||||
delete: Delete
|
||||
|
|
|
@ -1034,7 +1034,6 @@ ja:
|
|||
tags: 登録できるタグ数の上限に達しています
|
||||
over_limit: 所持できるアンテナ数 %{limit}を超えています
|
||||
over_stl_limit: 所持できるSTLモード付きアンテナ数 (ホーム/リストそれぞれにつき%{limit}) を超えています
|
||||
remove_list_with_antenna: アンテナが関連付けられているリストは削除できません
|
||||
edit:
|
||||
accounts_hint: ローカルアカウントの場合は「@info」、リモートアカウントの場合は「@info@example.com」の形式で指定します。サーバーが認識していないアカウントは保存時に自動的に削除されます。
|
||||
accounts_raw: 絞り込むアカウント
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue