Beispiel #1
0
 def add_schedule(self, uuid, data):
     try:
         sch = ScheduleModel(uuid=uuid, **data)
         sch.save_to_db()
         return sch
     except Exception as e:
         abort(500, message=str(e))
Beispiel #2
0
 def add_schedule(cls, data):
     uuid = str(shortuuid.uuid())
     schedule = ScheduleModel(uuid=uuid, **data)
     schedule.save_to_db()
     return schedule