)]}'
{"ironic/api/controllers/v1/node.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"6dcdde80792ffd8dc88eda6872f5f2c71ee6bf28","unresolved":false,"context_lines":[{"line_number":325,"context_line":""},{"line_number":326,"context_line":"    def __init__(self, **kwargs):"},{"line_number":327,"context_line":"        self.fields \u003d []"},{"line_number":328,"context_line":"        fields \u003d objects.Node.fields.keys()"},{"line_number":329,"context_line":"        for k in fields:"},{"line_number":330,"context_line":"            # Skip fields we do not expose."},{"line_number":331,"context_line":"            if not hasattr(self, k):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWX%2F%2F%2Fvc%3D","line":328,"updated":"2014-04-08 00:17:36.000000000","message":"Can just do \u0027for field in objects.Node.fields:\u0027\n\nbut I was wondering if it might make more sense to figure out the appropriate fields once and save that list, using that \u0027internal field\u0027 list in the __init__ and the NodesController.patch() below. The list of fields won\u0027t change and I think it\u0027d be easier to maintain the code w/o having to do the hasattr() song-and-dance in both places each time.","commit_id":"3f49758c82619b424f623f71df1ef051e50dda4c"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"ef5953ab6f6e9132bf65f5a7f31d2708f7990810","unresolved":false,"context_lines":[{"line_number":325,"context_line":""},{"line_number":326,"context_line":"    def __init__(self, **kwargs):"},{"line_number":327,"context_line":"        self.fields \u003d []"},{"line_number":328,"context_line":"        fields \u003d objects.Node.fields.keys()"},{"line_number":329,"context_line":"        for k in fields:"},{"line_number":330,"context_line":"            # Skip fields we do not expose."},{"line_number":331,"context_line":"            if not hasattr(self, k):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAW3%2F%2F9xo%3D","line":328,"in_reply_to":"AAAAWX%2F%2F%2Fvc%3D","updated":"2014-04-09 07:46:26.000000000","message":"Yeah, not a bad suggestion.","commit_id":"3f49758c82619b424f623f71df1ef051e50dda4c"}]}
