Fix selecting a field in non-interactive mode
The command: boobank ing history blabla@ing -f table -s label,amount,date was bugued, sinceb770163d9b. Before to iter the history, boobank uses the get_object method, with fields set to []. The goal is to not use the selected_fields configured by the user. But the commitb770163d9badded: "or self.selected_fields" Since "if []" return false, it cannot works.
This commit is contained in:
parent
8d975aa1d2
commit
a03f2b627e
1 changed files with 6 additions and 6 deletions
|
|
@ -351,12 +351,12 @@ class ReplApplication(Cmd, ConsoleApplication):
|
|||
kwargs['backends'].append(backend)
|
||||
else:
|
||||
kwargs['backends'] = backends
|
||||
|
||||
fields = kwargs.pop('fields', self.selected_fields) or self.selected_fields
|
||||
if '$direct' in fields:
|
||||
fields = []
|
||||
elif '$full' in fields:
|
||||
fields = None
|
||||
fields = kwargs.pop('fields', self.selected_fields)
|
||||
if not fields and fields != []:
|
||||
if '$direct' in fields:
|
||||
fields = []
|
||||
elif '$full' in fields:
|
||||
fields = None
|
||||
return self.weboob.do(self._do_complete, self.options.count, fields, function, *args, **kwargs)
|
||||
|
||||
# -- command tools ------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue