Update merge-person script to handle contraints and roles. Commit ready for merge.

- Legacy-Id: 9715
This commit is contained in:
Ryan Cross 2015-07-10 21:57:55 +00:00
parent dade901827
commit 5dfe492cfb

View file

@ -56,6 +56,16 @@ for subevent in source.submissionevent_set.all():
subevent.by = target
subevent.save()
# merge Constraints
for constraint in source.constraint_set.all():
constraint.person = target
constraint.save()
# merge Roles
for role in source.role_set.all():
role.person = target
role.save()
# check for any remaining relationships and delete if none
objs = [source]
opts = Person._meta