[repl] change formatter when it cannot handle all selected fields
This commit is contained in:
parent
b8a1df26c1
commit
b75d6dafcf
1 changed files with 6 additions and 0 deletions
|
|
@ -343,6 +343,12 @@ class ReplApplication(Cmd, ConsoleApplication):
|
||||||
fields = []
|
fields = []
|
||||||
elif '$full' in fields:
|
elif '$full' in fields:
|
||||||
fields = None
|
fields = None
|
||||||
|
|
||||||
|
if self.formatter.MANDATORY_FIELDS is not None:
|
||||||
|
missing_fields = set(fields) - set(self.formatter.MANDATORY_FIELDS)
|
||||||
|
if missing_fields:
|
||||||
|
self.formatter = self.formatters_loader.build_formatter(ReplApplication.DEFAULT_FORMATTER)
|
||||||
|
|
||||||
return self.weboob.do(self._do_complete, self.options.count, fields, function, *args, **kwargs)
|
return self.weboob.do(self._do_complete, self.options.count, fields, function, *args, **kwargs)
|
||||||
|
|
||||||
# -- command tools ------------
|
# -- command tools ------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue