Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Neff <benjamin@coding4coffee.ch>2021-09-19 04:13:02 +0300
committerBenjamin Neff <benjamin@coding4coffee.ch>2021-09-19 04:13:02 +0300
commitb8ea120ff2d7e7f2f440d892b81cc334383b08b0 (patch)
tree819ab797e2cf37b9f7bc0e219d6c4473ce1af196 /app/models/person.rb
parent2a99cc93ba04d0676ae667e33ee98fbc13c37345 (diff)
Backport account_migration relation on person from #7660
Diffstat (limited to 'app/models/person.rb')
-rw-r--r--app/models/person.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/person.rb b/app/models/person.rb
index 081a08dd8..66f731522 100644
--- a/app/models/person.rb
+++ b/app/models/person.rb
@@ -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