Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cookies policy update #103

Closed
johnpeart opened this issue Jun 25, 2022 · 2 comments
Closed

Cookies policy update #103

johnpeart opened this issue Jun 25, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@johnpeart
Copy link
Collaborator

Issue

The new functionality added to allow a user to select the matching algorithm they want relies upon a new cookie.
This cookie is not reflected in the cookie policy.

Proposed solution

In the cookies.html page template, add info on the new cookie.

@johnpeart johnpeart added the bug Something isn't working label Jun 25, 2022
@johnpeart johnpeart self-assigned this Jun 25, 2022
@johnpeart
Copy link
Collaborator Author

@jonodrew I believe my assessment is correct?
It's based on the below code from the routes.py file:

@main_bp.route("/options", methods=["GET", "POST"])
def options():
    if request.method == "GET":
        return render_template("options.html")
    else:
        matching_function = request.form.get("radios--outcomes", "quality")
        response = make_response(redirect(url_for("main.process")))
        response.set_cookie(
            "matching_func",
            matching_function,
            expires=datetime.datetime.now() + timedelta(minutes=30),
        )
        return response

I think a new 'matching_func' cookie has been created?

If this is correct, I will do a PR to update the cookies page.

@jonodrew jonodrew linked a pull request Jun 25, 2022 that will close this issue
@jonodrew
Copy link
Owner

Yes, that's right! Thanks for catching it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants