Fix instance actor being incorrectly created when running migrations (#18109)
* Add migration test about instance actor key * Fix old migration * Work around incorrect database state
This commit is contained in:
@@ -13,7 +13,7 @@ module AccountFinderConcern
|
||||
end
|
||||
|
||||
def representative
|
||||
Account.find(-99)
|
||||
Account.find(-99).tap(&:ensure_keys!)
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
Account.create!(id: -99, actor_type: 'Application', locked: true, username: Rails.configuration.x.local_domain)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user