Commit 93ee2b51 authored by Christophe Francois's avatar Christophe Francois Committed by Vincent A

[creditmutuel] Fix condition in iter market orders

Rows with label 'Remboursement' were filtered out but it's not the only
one that isn't a market order. Instead we filter out rows with no
details link since market orders do have a link.
parent caa90d41
......@@ -1932,9 +1932,9 @@ class PorMarketOrdersPage(PorHistoryPage):
klass = MarketOrder
def condition(self):
return 'Remboursement' not in CleanText('.')(self)
return Base(TableCell('direction'), Link('.//a', default=None))(self) is not None
obj_id = Base(TableCell('direction'), Regexp(Link('.//a'), r'ref=([^&]+)'))
obj_id = Base(TableCell('direction'), Regexp(Link('.//a', default=''), r'ref=([^&]+)', default=None))
obj_direction = Map(
CleanText(TableCell('direction')),
MARKET_ORDER_DIRECTIONS,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment