Skip to content

Commit d10d198

Browse files
authored
Fixed invalid status in summary when no results were found (#898)
1 parent 4f9d79e commit d10d198

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

include/parsers/filter/cli_helper.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,9 @@ struct cli_helper : public boost::noncopyable {
346346
filter.match_post();
347347
PB::Commands::QueryResponseMessage::Response::Line *line = response->add_lines();
348348
modern_filter::perf_writer writer(*line);
349+
if ((data.empty_state != "ignored") && (!filter.summary.has_matched())) {
350+
filter.summary.returnCode = nscapi::plugin_helper::translateReturn(data.empty_state);
351+
}
349352
std::string msg = filter.get_message();
350353
if (data.escape_html) {
351354
boost::replace_all(msg, "<", "&lt;");

0 commit comments

Comments
 (0)