diff options
author | Claire <claire.github-309c@sitedethib.com> | 2021-08-10 00:25:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-10 00:25:33 +0200 |
commit | 70b7ac9ff32a713e71a7ba6408a379b601c6839f (patch) | |
tree | f048b304f0d4f0f49e51c2edb8b74ccae6ac89e6 /app/workers/move_worker.rb | |
parent | a61645ed30b854a1b4935026801eb5b287954095 (diff) | |
parent | 8681ef85d0728b9d34dc62785fab6fcec30ba95c (diff) |
Merge pull request #1583 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/workers/move_worker.rb')
-rw-r--r-- | app/workers/move_worker.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/workers/move_worker.rb b/app/workers/move_worker.rb index 53a6b87f1..cc2c17d32 100644 --- a/app/workers/move_worker.rb +++ b/app/workers/move_worker.rb @@ -47,7 +47,7 @@ class MoveWorker def copy_account_notes! AccountNote.where(target_account: @source_account).find_each do |note| - text = I18n.with_locale(note.account.user.locale || I18n.default_locale) do + text = I18n.with_locale(note.account.user&.locale || I18n.default_locale) do I18n.t('move_handler.copy_account_note_text', acct: @source_account.acct) end @@ -84,7 +84,7 @@ class MoveWorker def add_account_note_if_needed!(account, id) unless AccountNote.where(account: account, target_account: @target_account).exists? - text = I18n.with_locale(account.user.locale || I18n.default_locale) do + text = I18n.with_locale(account.user&.locale || I18n.default_locale) do I18n.t(id, acct: @source_account.acct) end AccountNote.create!(account: account, target_account: @target_account, comment: text) |