)]}'
{"mistral/api/controllers/v2/workbook.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"7df84e1ac9e77d266feffc440d30d91be4010e41","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        acl.enforce(\u0027workbooks:create\u0027, context.ctx())"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        definition \u003d pecan.request.text"},{"line_number":91,"context_line":"        scope \u003d pecan.request.GET.get(\u0027scope\u0027, \u0027private\u0027)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        if scope not in resources.SCOPE_TYPES.values:"},{"line_number":94,"context_line":"            raise exc.InvalidModelException("},{"line_number":95,"context_line":"                \"Scope must be one of the following: %s; actual: \""},{"line_number":96,"context_line":"                \"%s\" % (resources.SCOPE_TYPES.values, scope)"},{"line_number":97,"context_line":"            )"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        LOG.debug(\"Create workbook [definition\u003d%s]\", definition)"},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"df7087c5_4a548821","line":97,"range":{"start_line":91,"start_character":8,"end_line":97,"end_character":13},"updated":"2018-03-22 08:44:14.000000000","message":"Suggestion: even within this file this code snippet repeats twice. There are also others (e.g. workflows.py). Can you please refactor it and move it to some function. Maybe it should be in resources.py module or rest_utils.py. Please think about it.","commit_id":"b5dda8bc2ecaba0c9dfcf523f715a97c347b66de"}]}
