Account model throws errors if old private_key column is accessed

This commit is contained in:
Maxim Lapis 2025-09-04 16:28:33 +02:00
parent d33ef7a48f
commit 465195b39b

View File

@ -500,4 +500,13 @@ class Account < ApplicationRecord
def trigger_update_webhooks
TriggerWebhookWorker.perform_async('account.updated', 'Account', id) if local?
end
# Temporary errors while private_key is still a field in the accounts table
def private_key=
raise 'private_key= is deprecated. Use account.account_secret.private_key= '
end
def private_key
raise 'private_key is deprecated. Use account.account_secret.private_key'
end
end