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
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
|
raise Mastodon::ValidationError, I18n.t('antennas.errors.remove_list_with_antenna') if Antenna.where(list_id: @list.id).any?
|
||||||
@list.destroy!
|
@list.destroy!
|
||||||
render_empty
|
render_empty
|
||||||
end
|
end
|
||||||
|
|
|
@ -994,6 +994,7 @@ en:
|
||||||
empty_contexts: No contexts! You must set any context filters
|
empty_contexts: No contexts! You must set any context filters
|
||||||
invalid_context: None or invalid context supplied
|
invalid_context: None or invalid context supplied
|
||||||
invalid_list_owner: This list is not yours
|
invalid_list_owner: This list is not yours
|
||||||
|
remove_list_with_antenna: Cannot remove list because this list is related to antenna.
|
||||||
index:
|
index:
|
||||||
contexts: Antennas in %{contexts}
|
contexts: Antennas in %{contexts}
|
||||||
delete: Delete
|
delete: Delete
|
||||||
|
|
|
@ -950,6 +950,7 @@ ja:
|
||||||
errors:
|
errors:
|
||||||
empty_contexts: 絞り込み条件が1つも指定されていないため無効です(除外条件はカウントされません)
|
empty_contexts: 絞り込み条件が1つも指定されていないため無効です(除外条件はカウントされません)
|
||||||
invalid_list_owner: これはあなたのリストではありません
|
invalid_list_owner: これはあなたのリストではありません
|
||||||
|
remove_list_with_antenna: アンテナが関連付けられているリストは削除できません
|
||||||
edit:
|
edit:
|
||||||
accounts_hint: ローカルアカウントの場合は「@info」、リモートアカウントの場合は「@info@example.com」の形式で指定します。サーバーが認識していないアカウントは保存時に自動的に削除されます。
|
accounts_hint: ローカルアカウントの場合は「@info」、リモートアカウントの場合は「@info@example.com」の形式で指定します。サーバーが認識していないアカウントは保存時に自動的に削除されます。
|
||||||
accounts_raw: 絞り込むアカウント
|
accounts_raw: 絞り込むアカウント
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue