diff --git a/account_statement_import_online_gocardless/models/online_bank_statement_provider.py b/account_statement_import_online_gocardless/models/online_bank_statement_provider.py index 1b8ef2b5e..bc63ac4f0 100644 --- a/account_statement_import_online_gocardless/models/online_bank_statement_provider.py +++ b/account_statement_import_online_gocardless/models/online_bank_statement_provider.py @@ -101,7 +101,9 @@ def action_select_gocardless_bank(self): _("To continue configure bank account on journal %s") % (self.journal_id.display_name) ) - country = self.journal_id.bank_account_id.company_id.country_id + country = ( + self.journal_id.bank_account_id.company_id or self.journal_id.company_id + ).country_id response = requests.get( f"{GOCARDLESS_ENDPOINT}/institutions/", params={"country": country.code},