def METHOD_NAME(role_id, shift_id, user_id):
    se = ShiftEntry.query.filter(
        ShiftEntry.shift_id == shift_id, ShiftEntry.user_id == user_id
    ).first_or_404()
    se.abandoned = not se.abandoned
    db.session.commit()
    return redirect(url_for(".role_admin", role_id=role_id))