def save_object(self, object): object.id = int_or_None(self.form_class().id.data) self.db_session.add(object) self.db_session.commit()
def save_object(self, obj): obj.id = int_or_None(self.form_class().id.data) obj.calulate_time_and_week() self.db_session.add(obj) self.db_session.commit()