Unverified Commit c61c4565 authored by Eugen Rochko's avatar Eugen Rochko Committed by GitHub
Browse files

Fix nil error in migration (#7680)

Under rare circumstances the user record could have already been deleted before...
parent ad40bf5e
...@@ -49,7 +49,7 @@ class FixAccountsUniqueIndex < ActiveRecord::Migration[5.2] ...@@ -49,7 +49,7 @@ class FixAccountsUniqueIndex < ActiveRecord::Migration[5.2]
# are always either going to be local or not local, so only # are always either going to be local or not local, so only
# one check is needed. Since we cannot support two users with # one check is needed. Since we cannot support two users with
# the same username locally, one has to go. 😢 # the same username locally, one has to go. 😢
other_account.user.destroy other_account.user&.destroy
end end
other_account.destroy other_account.destroy
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment