weboob.browser.filters: Handle values with empty() for numeric values
Example: ```python amount = Coalesce( CleanDecimal.US('//xpath', default=NotAbailable), CleanDecimal.US('//xpath2', default=NotAvailable), )(self.doc) ``` If one of the CleanDecimal returns NotAvailable and the other '0.00', with the current behavior, Coalesce will crash with "All falsy and no default" because we use "if value" in the loop of the filter. With empty(value), Coalesce accepts 0.00 as a valid value for numeric elements.
parent
c7b6e6d9
Please register or sign in to comment