def get_multiselected(obj, attr): return Selection.select(AND(Selection.q.userID == obj.id, Selection.q.attr_name==attr))
def get_singleselected(obj, attr): try: return Selection.select(AND(Selection.q.userID == obj.id, Selection.q.attr_name==attr))[0] except: return None