)]}'
{"manila/api/views/shares.py":[{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"3edc0a0524fbf09c39abb4ff9e4f41e52e326f45","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        share_instance \u003d share.get(\u0027instance\u0027) or {}"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        if share_instance and share_instance.get(\u0027share_type\u0027):"},{"line_number":71,"context_line":"            share_type \u003d share_instance.get(\u0027share_type\u0027).get(\u0027name\u0027)"},{"line_number":72,"context_line":"        elif share[\u0027share_type_id\u0027] and share.get(\u0027share_type\u0027):"},{"line_number":73,"context_line":"            share_type \u003d share[\u0027share_type\u0027][\u0027name\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_c3cfee26","line":70,"range":{"start_line":70,"start_character":11,"end_line":70,"end_character":25},"updated":"2017-05-24 11:09:29.000000000","message":"I believe this check is not needed, as if it is {} then the get still works and will return something that will fail the condition safely.","commit_id":"c67ae371294224323171b4cd8cdee19fd79ef7dc"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"13ff520ae54be737739182ee366f5966ad590505","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        share_instance \u003d share.get(\u0027instance\u0027) or {}"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        if share_instance and share_instance.get(\u0027share_type\u0027):"},{"line_number":71,"context_line":"            share_type \u003d share_instance.get(\u0027share_type\u0027).get(\u0027name\u0027)"},{"line_number":72,"context_line":"        elif share[\u0027share_type_id\u0027] and share.get(\u0027share_type\u0027):"},{"line_number":73,"context_line":"            share_type \u003d share[\u0027share_type\u0027][\u0027name\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_86fc6470","line":70,"range":{"start_line":70,"start_character":11,"end_line":70,"end_character":25},"in_reply_to":"ff0f0b1f_c3cfee26","updated":"2017-05-24 11:55:54.000000000","message":"OK.","commit_id":"c67ae371294224323171b4cd8cdee19fd79ef7dc"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"3edc0a0524fbf09c39abb4ff9e4f41e52e326f45","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        if share_instance and share_instance.get(\u0027share_type\u0027):"},{"line_number":71,"context_line":"            share_type \u003d share_instance.get(\u0027share_type\u0027).get(\u0027name\u0027)"},{"line_number":72,"context_line":"        elif share[\u0027share_type_id\u0027] and share.get(\u0027share_type\u0027):"},{"line_number":73,"context_line":"            share_type \u003d share[\u0027share_type\u0027][\u0027name\u0027]"},{"line_number":74,"context_line":"        else:"},{"line_number":75,"context_line":"            share_type \u003d share[\u0027share_type_id\u0027]"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        share_dict \u003d {"},{"line_number":78,"context_line":"            \u0027id\u0027: share.get(\u0027id\u0027),"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_a3ebda75","line":75,"range":{"start_line":72,"start_character":8,"end_line":75,"end_character":47},"updated":"2017-05-24 11:09:29.000000000","message":"based on the current DB modeling, I believe these conditions are never going to be used if we intend to not proxify the properties anymore. In other words, there is no way that this would work if the first condition you introduced doesn\u0027t work.","commit_id":"c67ae371294224323171b4cd8cdee19fd79ef7dc"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"13ff520ae54be737739182ee366f5966ad590505","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        if share_instance and share_instance.get(\u0027share_type\u0027):"},{"line_number":71,"context_line":"            share_type \u003d share_instance.get(\u0027share_type\u0027).get(\u0027name\u0027)"},{"line_number":72,"context_line":"        elif share[\u0027share_type_id\u0027] and share.get(\u0027share_type\u0027):"},{"line_number":73,"context_line":"            share_type \u003d share[\u0027share_type\u0027][\u0027name\u0027]"},{"line_number":74,"context_line":"        else:"},{"line_number":75,"context_line":"            share_type \u003d share[\u0027share_type_id\u0027]"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        share_dict \u003d {"},{"line_number":78,"context_line":"            \u0027id\u0027: share.get(\u0027id\u0027),"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_261b58ca","line":75,"range":{"start_line":72,"start_character":8,"end_line":75,"end_character":47},"in_reply_to":"ff0f0b1f_a3ebda75","updated":"2017-05-24 11:55:54.000000000","message":"Yes, I think you\u0027re right. My approach was wrong: I tried to make the current tests happy by falling back to the Share model in case the ShareInstance model did not provide what is requested. The tests should be adapted instead.","commit_id":"c67ae371294224323171b4cd8cdee19fd79ef7dc"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"3edc0a0524fbf09c39abb4ff9e4f41e52e326f45","unresolved":false,"context_lines":[{"line_number":114,"context_line":"    def modify_share_type_field(self, context, share_dict, share):"},{"line_number":115,"context_line":"        if share.get(\u0027instance\u0027):"},{"line_number":116,"context_line":"            share_type \u003d share.get(\u0027instance\u0027).get(\u0027share_type_id\u0027)"},{"line_number":117,"context_line":"        if not share_type:"},{"line_number":118,"context_line":"            share_type \u003d share.get(\u0027share_type_id\u0027)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        share_type_name \u003d None"},{"line_number":121,"context_line":"        if share.get(\u0027instance\u0027).get(\u0027share_type\u0027):"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_e3c312ec","line":118,"range":{"start_line":117,"start_character":8,"end_line":118,"end_character":51},"updated":"2017-05-24 11:09:29.000000000","message":"same here","commit_id":"c67ae371294224323171b4cd8cdee19fd79ef7dc"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"13ff520ae54be737739182ee366f5966ad590505","unresolved":false,"context_lines":[{"line_number":114,"context_line":"    def modify_share_type_field(self, context, share_dict, share):"},{"line_number":115,"context_line":"        if share.get(\u0027instance\u0027):"},{"line_number":116,"context_line":"            share_type \u003d share.get(\u0027instance\u0027).get(\u0027share_type_id\u0027)"},{"line_number":117,"context_line":"        if not share_type:"},{"line_number":118,"context_line":"            share_type \u003d share.get(\u0027share_type_id\u0027)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        share_type_name \u003d None"},{"line_number":121,"context_line":"        if share.get(\u0027instance\u0027).get(\u0027share_type\u0027):"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_a9a61b0e","line":118,"range":{"start_line":117,"start_character":8,"end_line":118,"end_character":51},"in_reply_to":"ff0f0b1f_e3c312ec","updated":"2017-05-24 11:55:54.000000000","message":"OK.","commit_id":"c67ae371294224323171b4cd8cdee19fd79ef7dc"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"3edc0a0524fbf09c39abb4ff9e4f41e52e326f45","unresolved":false,"context_lines":[{"line_number":118,"context_line":"            share_type \u003d share.get(\u0027share_type_id\u0027)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        share_type_name \u003d None"},{"line_number":121,"context_line":"        if share.get(\u0027instance\u0027).get(\u0027share_type\u0027):"},{"line_number":122,"context_line":"            share_type_name \u003d share.get("},{"line_number":123,"context_line":"                \u0027instance\u0027).get(\u0027share_type\u0027).get(\u0027name\u0027)"},{"line_number":124,"context_line":"        if not share_type_name and share.get(\u0027share_type\u0027):"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_63af022a","line":121,"range":{"start_line":121,"start_character":11,"end_line":121,"end_character":32},"updated":"2017-05-24 11:09:29.000000000","message":"it would be easier to do a share_instance \u003d share.get(\u0027instance\u0027) from the beginning, since you are using it multiple times","commit_id":"c67ae371294224323171b4cd8cdee19fd79ef7dc"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"13ff520ae54be737739182ee366f5966ad590505","unresolved":false,"context_lines":[{"line_number":118,"context_line":"            share_type \u003d share.get(\u0027share_type_id\u0027)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        share_type_name \u003d None"},{"line_number":121,"context_line":"        if share.get(\u0027instance\u0027).get(\u0027share_type\u0027):"},{"line_number":122,"context_line":"            share_type_name \u003d share.get("},{"line_number":123,"context_line":"                \u0027instance\u0027).get(\u0027share_type\u0027).get(\u0027name\u0027)"},{"line_number":124,"context_line":"        if not share_type_name and share.get(\u0027share_type\u0027):"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_4949bf5d","line":121,"range":{"start_line":121,"start_character":11,"end_line":121,"end_character":32},"in_reply_to":"ff0f0b1f_63af022a","updated":"2017-05-24 11:55:54.000000000","message":"OK.","commit_id":"c67ae371294224323171b4cd8cdee19fd79ef7dc"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"3edc0a0524fbf09c39abb4ff9e4f41e52e326f45","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        if share.get(\u0027instance\u0027).get(\u0027share_type\u0027):"},{"line_number":122,"context_line":"            share_type_name \u003d share.get("},{"line_number":123,"context_line":"                \u0027instance\u0027).get(\u0027share_type\u0027).get(\u0027name\u0027)"},{"line_number":124,"context_line":"        if not share_type_name and share.get(\u0027share_type\u0027):"},{"line_number":125,"context_line":"            share_type_name \u003d share.get(\u0027share_type\u0027).get(\u0027name\u0027)"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        share_dict.update({"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_8327b6ca","line":124,"range":{"start_line":124,"start_character":36,"end_line":124,"end_character":59},"updated":"2017-05-24 11:09:29.000000000","message":"this is not a proxified property, according to https://github.com/openstack/manila/blob/abbe3a2b52ac4491d8b862d8b7809e70ba887f45/manila/db/sqlalchemy/models.py","commit_id":"c67ae371294224323171b4cd8cdee19fd79ef7dc"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"13ff520ae54be737739182ee366f5966ad590505","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        if share.get(\u0027instance\u0027).get(\u0027share_type\u0027):"},{"line_number":122,"context_line":"            share_type_name \u003d share.get("},{"line_number":123,"context_line":"                \u0027instance\u0027).get(\u0027share_type\u0027).get(\u0027name\u0027)"},{"line_number":124,"context_line":"        if not share_type_name and share.get(\u0027share_type\u0027):"},{"line_number":125,"context_line":"            share_type_name \u003d share.get(\u0027share_type\u0027).get(\u0027name\u0027)"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        share_dict.update({"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_29b20b4a","line":124,"range":{"start_line":124,"start_character":36,"end_line":124,"end_character":59},"in_reply_to":"ff0f0b1f_8327b6ca","updated":"2017-05-24 11:55:54.000000000","message":"Dropped.","commit_id":"c67ae371294224323171b4cd8cdee19fd79ef7dc"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"81d38180e73aead77f59e29206f053798e8cedd6","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        share_instance \u003d share.get(\u0027instance\u0027) or {}"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        if share_instance.get(\u0027share_type\u0027):"},{"line_number":71,"context_line":"            share_type \u003d share_instance.get(\u0027share_type\u0027).get(\u0027name\u0027)"},{"line_number":72,"context_line":"        else:"},{"line_number":73,"context_line":"            share_type \u003d share_instance.get(\u0027share_type_id\u0027)"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ff0f0b1f_d430c658","line":71,"range":{"start_line":70,"start_character":8,"end_line":71,"end_character":69},"updated":"2017-05-24 12:42:05.000000000","message":"this could print an empty name. Although, I believe it is done this way because the 2.6 microversion fixes this, so I believe this logic should not be changed. If we were to fix this, this condition should include \"... and share_instance.get(\u0027share_type\u0027).get(\u0027name\u0027):\"","commit_id":"12c09a537d284d340083524845bb1d1c436a0fe3"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"8e754a0e6c9ff7c5ecf9209fb867bc9e216fbf8e","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        share_instance \u003d share.get(\u0027instance\u0027) or {}"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        if share_instance.get(\u0027share_type\u0027):"},{"line_number":71,"context_line":"            share_type \u003d share_instance.get(\u0027share_type\u0027).get(\u0027name\u0027)"},{"line_number":72,"context_line":"        else:"},{"line_number":73,"context_line":"            share_type \u003d share_instance.get(\u0027share_type_id\u0027)"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ff0f0b1f_ced4a74a","line":71,"range":{"start_line":70,"start_character":8,"end_line":71,"end_character":69},"in_reply_to":"ff0f0b1f_752a14db","updated":"2017-05-24 18:52:43.000000000","message":"yes, but this is expected behavior for microversion 2.0, this is addressed by microversion 2.6 below, so this does not need to be changed.","commit_id":"12c09a537d284d340083524845bb1d1c436a0fe3"},{"author":{"_account_id":11292,"name":"Arne Wiebalck","email":"Arne.Wiebalck@cern.ch","username":"wiebalck"},"change_message_id":"d9e267b1db77d3a18939e563a18afdef4c61c6b3","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        share_instance \u003d share.get(\u0027instance\u0027) or {}"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        if share_instance.get(\u0027share_type\u0027):"},{"line_number":71,"context_line":"            share_type \u003d share_instance.get(\u0027share_type\u0027).get(\u0027name\u0027)"},{"line_number":72,"context_line":"        else:"},{"line_number":73,"context_line":"            share_type \u003d share_instance.get(\u0027share_type_id\u0027)"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ff0f0b1f_752a14db","line":71,"range":{"start_line":70,"start_character":8,"end_line":71,"end_character":69},"in_reply_to":"ff0f0b1f_d430c658","updated":"2017-05-24 14:23:00.000000000","message":"From what I see, the previous code was implying that if there is a share_type, there would also be an associated name. In other words, the old code would also have printed an empty name, no?","commit_id":"12c09a537d284d340083524845bb1d1c436a0fe3"}]}
