Переглянути джерело

Fix nil error in migration (#7680)

Under rare circumstances the user record could have already been deleted before...
master
Eugen Rochko 6 роки тому
committed by GitHub
джерело
коміт
c61c4565ab
Не вдалося знайти GPG ключ що відповідає даному підпису Ідентифікатор GPG ключа: 4AEE18F83AFDEB23
1 змінених файлів з 1 додано та 1 видалено
  1. +1
    -1
      db/migrate/20180528141303_fix_accounts_unique_index.rb

+ 1
- 1
db/migrate/20180528141303_fix_accounts_unique_index.rb Переглянути файл

@@ -49,7 +49,7 @@ class FixAccountsUniqueIndex < ActiveRecord::Migration[5.2]
# are always either going to be local or not local, so only
# one check is needed. Since we cannot support two users with
# the same username locally, one has to go. 😢
other_account.user.destroy
other_account.user&.destroy
end

other_account.destroy


Завантаження…
Відмінити
Зберегти