def getUserSkill(cls,user,skill): skill = APPLICATION.getStorage().find({'user_id':user.id, 'skill_id':skill.id, '_className':'UserSkill'}) return KoaObject.load(skill[0]) # HERE BE DRAGONS
def getSkills(cls): skills = APPLICATION.getStorage().find({'_className':'Skill'}) return [KoaObject.load(i['_id']) for i in skills]
def getUserSkills(cls, user): skills = APPLICATION.getStorage().find({'user_id':user.id, '_className':'UserSkill'}) return [KoaObject.load(i['_id']) for i in skills]
def getNotesForUser(cls,user): notes = APPLICATION.getStorage().find({'recipient_id':user.id, '_className':'Note'}) return [KoaObject.load(i['_id']) for i in notes]