)]}'
{"searchlight/api/v1/search.py":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"6dc682944171206d2c8049a9e8716f5e3d432ed2","unresolved":false,"context_lines":[{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    def _get_query(self, context, query, resource_types, all_projects\u003dFalse):"},{"line_number":284,"context_line":"        is_admin \u003d context.is_admin"},{"line_number":285,"context_line":"        if is_admin and all_projects and query is not None:"},{"line_number":286,"context_line":"            query_params \u003d {"},{"line_number":287,"context_line":"                \u0027query\u0027: {"},{"line_number":288,"context_line":"                    \u0027query\u0027: query"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_505d8113","line":285,"updated":"2015-11-11 15:19:33.000000000","message":"This won\u0027t work because it changes the meaning of the conditional - the absence of a query will cause the \u0027else\u0027 to get executed. \n\nLooking at the code again, it looks like the easiest/best way to fix this is to set query equal to {\"match_all\": {}} if nothing\u0027s supplied by the user (in the \u0027search\u0027 function, line 356).\n\nMore generally though (and this can be a separate patch) we should be checking the errors from elasticsearch; in this case, e-s returns a 400 error and we should honor that since we\u0027ll never be able to fully validate inputs.","commit_id":"a8f090a134282151af95d110ee99327c52cfc5a0"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"c583c7a39fbf2c8f8987b5c0551e213773d32ed7","unresolved":false,"context_lines":[{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    def _get_query(self, context, query, resource_types, all_projects\u003dFalse):"},{"line_number":284,"context_line":"        is_admin \u003d context.is_admin"},{"line_number":285,"context_line":"        if is_admin and all_projects and query is not None:"},{"line_number":286,"context_line":"            query_params \u003d {"},{"line_number":287,"context_line":"                \u0027query\u0027: {"},{"line_number":288,"context_line":"                    \u0027query\u0027: query"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_386c48cd","line":285,"in_reply_to":"da85f559_505d8113","updated":"2015-11-12 01:33:01.000000000","message":"looks reasonable, thanks!","commit_id":"a8f090a134282151af95d110ee99327c52cfc5a0"}]}
