@cases_bp.route('<STR_LIT>', methods=['<STR_LIT:POST>'])<EOL>def pin_variant(institute_id, case_name, variant_id):
institute_obj, case_obj = institute_and_case(store, institute_id, case_name)<EOL>variant_obj = store.variant(variant_id)<EOL>user_obj = store.user(current_user.email)<EOL>link = url_for('<STR_LIT>', institute_id=institute_id, case_name=case_name,<EOL>variant_id=variant_id)<EOL>if request.form['<STR_LIT:action>'] == '<STR_LIT>':<EOL><INDENT>store.pin_variant(institute_obj, case_obj, user_obj, link, variant_obj)<EOL><DEDENT>elif request.form['<STR_LIT:action>'] == '<STR_LIT>':<EOL><INDENT>store.unpin_variant(institute_obj, case_obj, user_obj, link, variant_obj)<EOL><DEDENT>return redirect(request.referrer or link)<EOL>
Pin and unpin variants to/from the list of suspects.