[boobill] condition not working when querying documents over all subscriptions
- weeboob version 1.6 (dev head)
- os: linux - debian 10 (buster)
- python: 3.7.6
When querying documents for a specific subscription with a condition it works as expected (listing only docs matching condition) For instance:
>boobill documents xxxxxx@societegenerale -c 'date>2020-01-01'
...list of docs...
But launching same command without specifying the subscription, hopefully to go through all of them it crash complaining with 'Field "X" is not valid' For instance:
>boobill documents -c 'date>2020-01-01'
Error(lcl): Field "date" is not valid.
Error(societegenerale): Field "date" is not valid.
On the other hand, it works without setting condition iterating as expected over all documents of all subscriptions.
To be further investigated but apparently is_valid
function from weboob/tootls/application/results.py
(line 101) is called with an object of type Subscription instead of type Document thus not having the same fields.
It looks like the extra level of iteration (over subscriptions) is messing up trying to apply condition right away instead of pushing it ahead at later stage.