示例#1
0
文件: record.py 项目: MrKiven/KT-Web
 def get(cls, todo_name):
     res = db.session.query(cls).\
         filter(cls.todo_name == todo_name).first()
     if res:
         return res.to_dict()
     raise NotFoundResourceException(
         NOT_FOUND_RESOURCE_MESSAGE.format(cls.__name__, todo_name))
示例#2
0
文件: record.py 项目: zzznn/KT-Web
 def get(cls, todo_name):
     res = db.session.query(cls).\
         filter(cls.todo_name == todo_name).first()
     if res:
         return res.to_dict()
     raise NotFoundResourceException(
         NOT_FOUND_RESOURCE_MESSAGE.format(cls.__name__, todo_name))