)]}'
{"cinder/objects/volume.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"fd60ea7774e66a9932c6f43f8ef9d6c3cc33e3f1","unresolved":false,"context_lines":[{"line_number":348,"context_line":"                if updates.get(\u0027consistencygroup\u0027):"},{"line_number":349,"context_line":"                    raise exception.ObjectActionError("},{"line_number":350,"context_line":"                        action\u003d\u0027save\u0027, reason\u003d_(\u0027consistencygroup changed\u0027))"},{"line_number":351,"context_line":"                else:"},{"line_number":352,"context_line":"                    # NOTE(xyang): Remove it to avoid the DBAPIError exception"},{"line_number":353,"context_line":"                    # (psycopg2.ProgrammingError) about multiple assignments"},{"line_number":354,"context_line":"                    # to same column \"consistencygroup_id\""}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_da08a529","line":351,"updated":"2017-07-13 00:57:43.000000000","message":"can\u0027t you simply remove the else and pop unconditionally outside the nested if? It\u0027s more readable IMO","commit_id":"558c52696ddf8e2b642552e204ebcf50af1a3939"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"758fb799736ce2323f74b703ad5a0e24d6a0aa79","unresolved":false,"context_lines":[{"line_number":348,"context_line":"                if updates.get(\u0027consistencygroup\u0027):"},{"line_number":349,"context_line":"                    raise exception.ObjectActionError("},{"line_number":350,"context_line":"                        action\u003d\u0027save\u0027, reason\u003d_(\u0027consistencygroup changed\u0027))"},{"line_number":351,"context_line":"                else:"},{"line_number":352,"context_line":"                    # NOTE(xyang): Remove it to avoid the DBAPIError exception"},{"line_number":353,"context_line":"                    # (psycopg2.ProgrammingError) about multiple assignments"},{"line_number":354,"context_line":"                    # to same column \"consistencygroup_id\""}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_7ad751c1","line":351,"in_reply_to":"1f1a1f67_da08a529","updated":"2017-07-13 01:37:22.000000000","message":"Done","commit_id":"558c52696ddf8e2b642552e204ebcf50af1a3939"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"12d16dac89d5d4940ef2bfc891e476e0f71ea0d8","unresolved":false,"context_lines":[{"line_number":342,"context_line":"    def save(self):"},{"line_number":343,"context_line":"        updates \u003d self.cinder_obj_get_changes()"},{"line_number":344,"context_line":"        if updates:"},{"line_number":345,"context_line":"            if \u0027consistencygroup\u0027 in updates:"},{"line_number":346,"context_line":"                # NOTE(xyang): Allow this to pass if \u0027consistencygroup\u0027 is"},{"line_number":347,"context_line":"                # set to None. This is to support backward compatibility."},{"line_number":348,"context_line":"                if updates.get(\u0027consistencygroup\u0027):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_61b54f31","line":345,"updated":"2017-07-13 15:26:58.000000000","message":"nit: We could really change from L345 to L354 with:\n\n if updates.pop(\u0027consistencygroup, None):\n     raise exception.ObjectActionError(\n         action\u003d\u0027save\u0027, reason\u003d_(\u0027consistencygroup changed\u0027))","commit_id":"99bef61a2df99f895354e6328af788ed8c12b39b"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"ef973cf1e49f268938c1b90cfca9e3fccdc652b8","unresolved":false,"context_lines":[{"line_number":342,"context_line":"    def save(self):"},{"line_number":343,"context_line":"        updates \u003d self.cinder_obj_get_changes()"},{"line_number":344,"context_line":"        if updates:"},{"line_number":345,"context_line":"            if \u0027consistencygroup\u0027 in updates:"},{"line_number":346,"context_line":"                # NOTE(xyang): Allow this to pass if \u0027consistencygroup\u0027 is"},{"line_number":347,"context_line":"                # set to None. This is to support backward compatibility."},{"line_number":348,"context_line":"                if updates.get(\u0027consistencygroup\u0027):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_db540b24","line":345,"in_reply_to":"1f1a1f67_61b54f31","updated":"2017-07-13 17:17:39.000000000","message":"Done","commit_id":"99bef61a2df99f895354e6328af788ed8c12b39b"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"12d16dac89d5d4940ef2bfc891e476e0f71ea0d8","unresolved":false,"context_lines":[{"line_number":350,"context_line":"                        action\u003d\u0027save\u0027, reason\u003d_(\u0027consistencygroup changed\u0027))"},{"line_number":351,"context_line":"                # NOTE(xyang): Remove it to avoid the DBAPIError exception"},{"line_number":352,"context_line":"                # (psycopg2.ProgrammingError) about multiple assignments"},{"line_number":353,"context_line":"                # to same column \"consistencygroup_id\""},{"line_number":354,"context_line":"                updates.pop(\u0027consistencygroup\u0027)"},{"line_number":355,"context_line":"            if \u0027group\u0027 in updates:"},{"line_number":356,"context_line":"                raise exception.ObjectActionError("}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_c688b9c7","line":353,"updated":"2017-07-13 15:26:58.000000000","message":"-1: We should be saying the reason why we have to remove it, not the effect we see if we don\u0027t.\n\nIt took me a little bit, because I couldn\u0027t see how a consistencygroup update could be transformed by SQLA into consistencygroup_id in that query.\n\nThe reason behind the issue (as I would have expected SQLA to complain that there\u0027s no consistencygroup field in Volume table) is because consistencygroup is the name of a relationship in the ORM Volume model, so SQLA tries to do some kind of update of the foreign key based on the provided update.","commit_id":"99bef61a2df99f895354e6328af788ed8c12b39b"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"07fd469e322e92701f00f9cd8278c76a356dc34c","unresolved":false,"context_lines":[{"line_number":350,"context_line":"                        action\u003d\u0027save\u0027, reason\u003d_(\u0027consistencygroup changed\u0027))"},{"line_number":351,"context_line":"                # NOTE(xyang): Remove it to avoid the DBAPIError exception"},{"line_number":352,"context_line":"                # (psycopg2.ProgrammingError) about multiple assignments"},{"line_number":353,"context_line":"                # to same column \"consistencygroup_id\""},{"line_number":354,"context_line":"                updates.pop(\u0027consistencygroup\u0027)"},{"line_number":355,"context_line":"            if \u0027group\u0027 in updates:"},{"line_number":356,"context_line":"                raise exception.ObjectActionError("}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_7c1cd269","line":353,"in_reply_to":"1f1a1f67_c688b9c7","updated":"2017-07-13 15:48:52.000000000","message":"Sure.  I\u0027ll change this.","commit_id":"99bef61a2df99f895354e6328af788ed8c12b39b"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"fb39e106653b270a4e9b42ba4457b1d4f5dc3e58","unresolved":false,"context_lines":[{"line_number":342,"context_line":"    def save(self):"},{"line_number":343,"context_line":"        updates \u003d self.cinder_obj_get_changes()"},{"line_number":344,"context_line":"        if updates:"},{"line_number":345,"context_line":"            if \u0027consistencygroup\u0027 in updates:"},{"line_number":346,"context_line":"                # NOTE(xyang): Allow this to pass if \u0027consistencygroup\u0027 is"},{"line_number":347,"context_line":"                # set to None. This is to support backward compatibility."},{"line_number":348,"context_line":"                # Also remove \u0027consistencygroup\u0027 from updates because"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_25dd0370","line":345,"range":{"start_line":345,"start_character":12,"end_line":345,"end_character":45},"updated":"2017-07-14 10:35:48.000000000","message":"-1: this is unnecessary, L353 works without this check because we are setting default value to None, so it won\u0027t raise an exception even if the value is not present.","commit_id":"d169843b0e9e9bef910ccaf9db019ffb1158d75c"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"54c481bb7e9a5aaa224e6e8f953d030bb704383d","unresolved":false,"context_lines":[{"line_number":342,"context_line":"    def save(self):"},{"line_number":343,"context_line":"        updates \u003d self.cinder_obj_get_changes()"},{"line_number":344,"context_line":"        if updates:"},{"line_number":345,"context_line":"            if \u0027consistencygroup\u0027 in updates:"},{"line_number":346,"context_line":"                # NOTE(xyang): Allow this to pass if \u0027consistencygroup\u0027 is"},{"line_number":347,"context_line":"                # set to None. This is to support backward compatibility."},{"line_number":348,"context_line":"                # Also remove \u0027consistencygroup\u0027 from updates because"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_7b6398b2","line":345,"range":{"start_line":345,"start_character":12,"end_line":345,"end_character":45},"in_reply_to":"1f1a1f67_25dd0370","updated":"2017-07-14 12:04:20.000000000","message":"Done","commit_id":"d169843b0e9e9bef910ccaf9db019ffb1158d75c"}]}
