Backport account_migration relation on person from #7660

This commit is contained in:
Benjamin Neff 2021-09-19 03:13:02 +02:00
parent 2a99cc93ba
commit b8ea120ff2
No known key found for this signature in database
GPG key ID: 971464C3F1A90194

View file

@ -57,6 +57,8 @@ class Person < ApplicationRecord
has_many :mentions, :dependent => :destroy
has_one :account_migration, foreign_key: :old_person_id, dependent: :nullify, inverse_of: :old_person
validate :owner_xor_pod
validate :other_person_with_same_guid, on: :create
validates :profile, :presence => true