Ejemplo n.º 1
0
def team_tickets(page=1):
    data = {}
    top_bar_params = todict(session)
    top_bar_params.update(request.args)            
    top_bar_params['ticket_count'] = get_ticket_count({'user_id': current_user.id, 'team_id': '1'}).get().get('total')
    top_bar_params['projects'] = [(project.get('id'), project.get('title')) for project in get_users_projects({'user_id': session.get('user_id')})]


    values = ordered_dict_to_dict(request.args)
    values['user_id'] = session.get('user_id')
    values['team_id'] = session.get('team_id')
    values['team_id'] = current_user.team_id
    team_tickets = team_tickets_view()    
    return make_response(team_tickets.render(values))