fix #372 conditions should not be treated by formatters
This commit is contained in:
parent
041e80e85d
commit
5fc8c14b2d
3 changed files with 16 additions and 14 deletions
|
|
@ -450,6 +450,7 @@ class ReplApplication(Cmd, BaseApplication):
|
|||
"""
|
||||
backends = kwargs.pop('backends', None)
|
||||
kwargs['backends'] = self.enabled_backends if backends is None else backends
|
||||
kwargs['condition'] = self.condition
|
||||
fields = self.selected_fields
|
||||
if fields == '$direct':
|
||||
fields = []
|
||||
|
|
@ -1019,11 +1020,9 @@ class ReplApplication(Cmd, BaseApplication):
|
|||
if fields in ('$direct', '$full'):
|
||||
fields = None
|
||||
try:
|
||||
self.formatter.format(obj=result, selected_fields=fields, condition=self.condition)
|
||||
self.formatter.format(obj=result, selected_fields=fields)
|
||||
except FieldNotFound, e:
|
||||
print e
|
||||
except ResultsConditionException, e:
|
||||
print e
|
||||
|
||||
def flush(self):
|
||||
self.formatter.flush()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue