def _clone_track_groups(self, new_event): attrs = get_simple_column_attrs(TrackGroup) for old_group in self.old_event.track_groups: group = TrackGroup() group.populate_from_attrs(old_group, attrs) new_event.track_groups.append(group) self._track_group_map[old_group] = group
def create_track_group(event, data): track_group = TrackGroup() track_group.event = event track_group.populate_from_dict(data) db.session.flush() logger.info('Track group %r created by %r', track_group, session.user) event.log(EventLogRealm.management, LogKind.positive, 'Track Groups', f'Track group "{track_group.title}" has been created.', session.user)
def _process_args(self): RHManageEventBase._process_args(self) self.track_group = TrackGroup.get_or_404( request.view_args['track_group_id'])