set svn:keywords property for proper keywords expansion
[plcapi.git] / PLC / Methods / RefreshPeer.py
index 5332074..40fb1e2 100644 (file)
@@ -228,6 +228,11 @@ class RefreshPeer(Method):
 
         # Keyed on foreign person_id
         old_peer_persons = Persons(self.api, {'peer_id': peer_id}, columns).dict('peer_person_id')
+
+       # artificially attach the persons returned by GetPeerData to the new peer 
+       # this is because validate_email needs peer_id to be correct when checking for duplicates 
+       for person in peer_tables['Persons']: 
+           person['peer_id']=peer_id
         persons_at_peer = dict([(peer_person['person_id'], peer_person) \
                                 for peer_person in peer_tables['Persons']])