Example #1
0
def add_motions(issues):
    for issue in issues:
        for m in issue.get('motions', []):
            # fold in the motion information
            motion = motions.find_one({'motion_id': m['motion_id']})
            if motion:
                # don't send back vote events, which is huge
                if 'vote_events' in motion:
                    del motion['vote_events']
            else:
                motion = {'motion_id': m['motion_id']}

            m['motion'] = motion
Example #2
0
def add_motions(issues):
    for issue in issues:
        for m in issue.get('motions', []):
            # fold in the motion information
            motion = motions.find_one({'motion_id': m['motion_id']})
            if motion:
                # don't send back vote events, which is huge
                if 'vote_events' in motion:
                    del motion['vote_events']
            else:
                motion = {'motion_id': m['motion_id']}

            m['motion'] = motion
Example #3
0
def motions_get(motion_id):
    obj = motions.find_one({'motion_id': motion_id})
    obj = obj_or_404(obj)
    return jsonify(obj)
Example #4
0
def motions_get(motion_id):
    obj = motions.find_one({"motion_id": motion_id})
    obj = obj_or_404(obj)
    return jsonify(obj)