def _clone_person_links(self, person_links, event_exists=False): attrs = get_simple_column_attrs(SessionBlockPersonLink) for old_link in person_links: link = SessionBlockPersonLink() link.populate_from_attrs(old_link, attrs) current_person = self._person_map[old_link.person] if event_exists and current_person.user_id in self._new_event_persons: link.person = self._new_event_persons[current_person.user_id] else: link.person = current_person yield link
def _clone_person_links(self, person_links): attrs = get_simple_column_attrs(SessionBlockPersonLink) for old_link in person_links: link = SessionBlockPersonLink() link.populate_from_attrs(old_link, attrs) link.person = self._person_map[old_link.person] yield link