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