)]}'
{"cinder/api/v2/views/volumes.py":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"7bf5ad1101a0edf62ec092f0bfe59602da7b58e8","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            }"},{"line_number":93,"context_line":"        }"},{"line_number":94,"context_line":"        ctxt \u003d request.environ[\u0027cinder.context\u0027]"},{"line_number":95,"context_line":"        if not ctxt.is_admin:"},{"line_number":96,"context_line":"            if volume_ref.get(\u0027attachments\u0027):"},{"line_number":97,"context_line":"                volume_ref[\u0027volume\u0027][\u0027attachments\u0027][\u0027host_name\u0027] \u003d None"},{"line_number":98,"context_line":"        if ctxt.is_admin:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff570b3c_e05bc8f2","line":95,"range":{"start_line":95,"start_character":8,"end_line":95,"end_character":29},"updated":"2020-05-20 00:26:29.000000000","message":"It would be more efficient to make this an else to the next if condition. That way ctx.is_admin would only need to be evaluated once. Like this, it needs to evaluate it twice.","commit_id":"9d5c340130ac056e7558468cc61872db65140c9b"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"3ae40d7ab9be26efff9e24dac167ad085e269eff","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            }"},{"line_number":93,"context_line":"        }"},{"line_number":94,"context_line":"        ctxt \u003d request.environ[\u0027cinder.context\u0027]"},{"line_number":95,"context_line":"        if not ctxt.is_admin:"},{"line_number":96,"context_line":"            if volume_ref.get(\u0027attachments\u0027):"},{"line_number":97,"context_line":"                volume_ref[\u0027volume\u0027][\u0027attachments\u0027][\u0027host_name\u0027] \u003d None"},{"line_number":98,"context_line":"        if ctxt.is_admin:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff570b3c_b4d47249","line":95,"range":{"start_line":95,"start_character":8,"end_line":95,"end_character":29},"in_reply_to":"ff570b3c_e05bc8f2","updated":"2020-05-20 05:03:50.000000000","message":"Yeah i thought about it initially but then the if and else statements would be unrelated which isn\u0027t good for readability.\nlet me know if we still want to make that change.","commit_id":"9d5c340130ac056e7558468cc61872db65140c9b"}]}
