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:
parent
f47a9ddc9f
commit
33cd80d69c
4 changed files with 20 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue