Display is: operators properly in get_old_messages logging.

(imported from commit 3fdcc73b732040918a89d84bc83f2622d956c6bb)
This commit is contained in:
Tim Abbott 2013-12-06 11:44:34 -05:00
parent e4f917aa9c
commit 7de3c63146
1 changed files with 7 additions and 2 deletions

View File

@ -1107,8 +1107,13 @@ def get_old_messages_backend(request, user_profile,
# Add some metadata to our logging data for narrows
if narrow is not None:
operator_data = ",".join(operator for (operator, operand) in narrow)
request._log_data['extra'] = "[%s]" % (operator_data,)
verbose_operators = []
for (operator, operand) in narrow:
if operator == "is":
verbose_operators.append("is:" + operand)
else:
verbose_operators.append(operator)
request._log_data['extra'] = "[%s]" % (",".join(verbose_operators),)
num_extra_messages = 1
is_search = False