Commit f49b508f authored by Florian Duguet's avatar Florian Duguet Committed by Romain Bignon

[societegenerale] fix iter_documents_by_types function in module.py

Closes: 44006@sibi
parent e9985af6
......@@ -158,7 +158,16 @@ class SocieteGeneraleModule(Module, CapBankWealth, CapBankTransferAddRecipient,
return self.browser.iter_documents(subscription)
def iter_documents_by_types(self, subscription, accepted_types):
return self.browser.iter_documents_by_types(subscription, accepted_types)
if not isinstance(subscription, Subscription):
subscription = self.get_subscription(subscription)
if self.config['website'].get() not in ('ent', 'pro'):
for doc in self.browser.iter_documents_by_types(subscription, accepted_types):
yield doc
else:
for doc in self.browser.iter_documents(subscription):
if doc.type in accepted_types:
yield doc
def download_document(self, document):
if not isinstance(document, Document):
......
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