)]}'
{"horizon/utils/functions.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"46ebb6f92db67fc4cf52f210b6e274435d4f6844","unresolved":true,"context_lines":[{"line_number":43,"context_line":"    # Store the translated string in the cookie"},{"line_number":44,"context_line":"    lang \u003d translation.get_language_from_request(request)"},{"line_number":45,"context_line":"    with translation.override(lang):"},{"line_number":46,"context_line":"        reason \u003d force_text(reason).encode(\u0027unicode_escape\u0027).decode(\u0027ascii\u0027)"},{"line_number":47,"context_line":"        response.set_cookie(\u0027logout_reason\u0027, reason, max_age\u003d10)"},{"line_number":48,"context_line":"        response.set_cookie(\u0027logout_status\u0027, status, max_age\u003d10)"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"2be3bf90_5c078704","line":46,"updated":"2021-09-01 20:17:26.000000000","message":"How about using openstack_auth.views.set_logout_reason()?\n\n  set_logout_reason(force_text(reason))\n\n(If so, it may be better to move the function to openstack_auth.utils)","commit_id":"a8f896110d685b221695842ed8d2645f1bb4e9c7"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"54b3b2cf3d1eb1410ea5aad1600629f2cd888426","unresolved":true,"context_lines":[{"line_number":43,"context_line":"    # Store the translated string in the cookie"},{"line_number":44,"context_line":"    lang \u003d translation.get_language_from_request(request)"},{"line_number":45,"context_line":"    with translation.override(lang):"},{"line_number":46,"context_line":"        reason \u003d force_text(reason).encode(\u0027unicode_escape\u0027).decode(\u0027ascii\u0027)"},{"line_number":47,"context_line":"        response.set_cookie(\u0027logout_reason\u0027, reason, max_age\u003d10)"},{"line_number":48,"context_line":"        response.set_cookie(\u0027logout_status\u0027, status, max_age\u003d10)"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"775c1b58_1545cf51","line":46,"in_reply_to":"166930ed_dfd1bfd3","updated":"2021-09-14 05:58:44.000000000","message":"Which function does \"this function\" mean? I commented such as I think it is better to keep both encoding and decoding logics (using unicode_escape and ascii) in a single place, but you might see more.","commit_id":"a8f896110d685b221695842ed8d2645f1bb4e9c7"},{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"820f90baf2dd6c2b95aef4c88e7c0006c5a8dbf6","unresolved":true,"context_lines":[{"line_number":43,"context_line":"    # Store the translated string in the cookie"},{"line_number":44,"context_line":"    lang \u003d translation.get_language_from_request(request)"},{"line_number":45,"context_line":"    with translation.override(lang):"},{"line_number":46,"context_line":"        reason \u003d force_text(reason).encode(\u0027unicode_escape\u0027).decode(\u0027ascii\u0027)"},{"line_number":47,"context_line":"        response.set_cookie(\u0027logout_reason\u0027, reason, max_age\u003d10)"},{"line_number":48,"context_line":"        response.set_cookie(\u0027logout_status\u0027, status, max_age\u003d10)"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"166930ed_dfd1bfd3","line":46,"in_reply_to":"2be3bf90_5c078704","updated":"2021-09-07 13:37:09.000000000","message":"I was thinking about this, but this function does the language override trick, which we don\u0027t want in the openstack_auth.","commit_id":"a8f896110d685b221695842ed8d2645f1bb4e9c7"},{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"6f035a1e85888bab1a19bc4793ca004c4a1f975a","unresolved":true,"context_lines":[{"line_number":43,"context_line":"    # Store the translated string in the cookie"},{"line_number":44,"context_line":"    lang \u003d translation.get_language_from_request(request)"},{"line_number":45,"context_line":"    with translation.override(lang):"},{"line_number":46,"context_line":"        reason \u003d force_text(reason).encode(\u0027unicode_escape\u0027).decode(\u0027ascii\u0027)"},{"line_number":47,"context_line":"        response.set_cookie(\u0027logout_reason\u0027, reason, max_age\u003d10)"},{"line_number":48,"context_line":"        response.set_cookie(\u0027logout_status\u0027, status, max_age\u003d10)"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fdd27b7c_c8111ce1","line":46,"in_reply_to":"775c1b58_1545cf51","updated":"2021-11-15 13:26:16.000000000","message":"add_logout_reason has an override on the language, and therefore depends on the django setup we have for the dashboard, while set_logout_reason only sets the cookie ignoring translations.\n\nBut I can call set_logout_reason from add_logout_reason, if that is what you mean?","commit_id":"a8f896110d685b221695842ed8d2645f1bb4e9c7"}],"openstack_auth/views.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"46ebb6f92db67fc4cf52f210b6e274435d4f6844","unresolved":true,"context_lines":[{"line_number":135,"context_line":"            \u0027single_value\u0027: \u0027\u0027,"},{"line_number":136,"context_line":"            \u0027label\u0027: \u0027\u0027,"},{"line_number":137,"context_line":"        },"},{"line_number":138,"context_line":"        \u0027logout_reason\u0027: request.COOKIES.get("},{"line_number":139,"context_line":"            \u0027logout_reason\u0027, \u0027\u0027).encode(\u0027ascii\u0027).decode(\u0027unicode_escape\u0027),"},{"line_number":140,"context_line":"        \u0027logout_status\u0027: request.COOKIES.get(\u0027logout_status\u0027),"},{"line_number":141,"context_line":"    }"},{"line_number":142,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"bf1d1c8e_0cde34a3","line":139,"range":{"start_line":138,"start_character":25,"end_line":139,"end_character":73},"updated":"2021-09-01 20:17:26.000000000","message":"Can\u0027t we improve the readability by using a variable?\n\n  logout_reason \u003d request.COOKIES.get(\u0027logout_reason\u0027, \u0027\u0027)\n  logout_reason \u003d logout_reason.encode(\u0027ascii\u0027).decode(\u0027unicode_escape\u0027)\n\nand assign it to the context here.","commit_id":"a8f896110d685b221695842ed8d2645f1bb4e9c7"}]}
