Esempio n. 1
0
def find_dashboard(user):
    dashboard_folder = Node.find_for_user(user, subquery=Q('is_dashboard', 'eq', True))

    if dashboard_folder.count() == 0:
        new_dashboard(user)
        dashboard_folder = Node.find_for_user(user, Q('is_dashboard', 'eq', True))
    return dashboard_folder[0]
Esempio n. 2
0
def find_dashboard(user):
    dashboard_folder = user.node__contributed.find(Q("is_dashboard", "eq", True))

    if dashboard_folder.count() == 0:
        new_dashboard(user)
        dashboard_folder = user.node__contributed.find(Q("is_dashboard", "eq", True))
    return dashboard_folder[0]
Esempio n. 3
0
def find_dashboard(user):
    dashboard_folder = Node.find_for_user(user, subquery=Q("is_dashboard", "eq", True))

    if dashboard_folder.count() == 0:
        new_dashboard(user)
        dashboard_folder = Node.find_for_user(user, Q("is_dashboard", "eq", True))
    return dashboard_folder[0]