Exemple #1
0
 def add_modes(self, new_modes):
     """
     Add new modes
     modes are not relationships so we don't need to keep them
     """
     for mode in new_modes:
         new_mode_obj = ActivityMode(label=mode)
         self.dbsession.add(new_mode_obj)
Exemple #2
0
def add_activity_mode(label):
    session = DBSESSION()
    session.add(ActivityMode(label=label))
    session.flush()