scout/server/blueprints/cases/views.py
def mark_causative(institute_id, case_name, variant_id):
    """Mark a variant as confirmed causative."""
    institute_obj, case_obj = institute_and_case(store, institute_id, case_name)
    variant_obj = store.variant(variant_id)
    user_obj = store.user(current_user.email)
    link = url_for('variants.variant', institute_id=institute_id, case_name=case_name,
                   variant_id=variant_id)
    if request.form['action'] == 'ADD':
        store.mark_causative(institute_obj, case_obj, user_obj, link, variant_obj)
    elif request.form['action'] == 'DELETE':
        store.unmark_causative(institute_obj, case_obj, user_obj, link, variant_obj)

    # send the user back to the case that was marked as solved
    case_url = url_for('.case', institute_id=institute_id, case_name=case_name)
    return redirect(case_url)
def mark_causative(institute_id, case_name, variant_id):
    """Mark a variant as confirmed causative."""
    institute_obj, case_obj = institute_and_case(store, institute_id, case_name)
    variant_obj = store.variant(variant_id)
    user_obj = store.user(current_user.email)
    link = url_for('variants.variant', institute_id=institute_id, case_name=case_name,
                   variant_id=variant_id)
    if request.form['action'] == 'ADD':
        store.mark_causative(institute_obj, case_obj, user_obj, link, variant_obj)
    elif request.form['action'] == 'DELETE':
        store.unmark_causative(institute_obj, case_obj, user_obj, link, variant_obj)

    # send the user back to the case that was marked as solved
    case_url = url_for('.case', institute_id=institute_id, case_name=case_name)
    return redirect(case_url)
def mark_causative ( institute_id , case_name , variant_id ) : institute_obj , case_obj = institute_and_case ( store , institute_id , case_name ) variant_obj = store . variant ( variant_id ) user_obj = store . user ( current_user . email ) link = url_for ( 'variants.variant' , institute_id = institute_id , case_name = case_name , variant_id = variant_id ) if request . form [ 'action' ] == 'ADD' : store . mark_causative ( institute_obj , case_obj , user_obj , link , variant_obj ) elif request . form [ 'action' ] == 'DELETE' : store . unmark_causative ( institute_obj , case_obj , user_obj , link , variant_obj ) # send the user back to the case that was marked as solved case_url = url_for ( '.case' , institute_id = institute_id , case_name = case_name ) return redirect ( case_url )
Mark a variant as confirmed causative.
Mark a variant as confirmed causative .