def create_new_tag(event, code, title, color, system=False):
    tag = EditingTag(code=code,
                     title=title,
                     color=color,
                     system=system,
                     event=event)
    db.session.flush()
    logger.info('Tag %r created by %r', tag, session.user)
    return tag
Пример #2
0
 def _clone_tags(self, new_event):
     attrs = get_simple_column_attrs(EditingTag)
     for old_tag in self.old_event.editing_tags:
         tag = EditingTag()
         tag.populate_from_attrs(old_tag, attrs)
         new_event.editing_tags.append(tag)