mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[FIX] UnboundLocalError: local variable 'payment_lines' referenced before assignment
When trying to import first statement and no other statements are present.
This commit is contained in:
@@ -598,6 +598,7 @@ class banking_import(wizard.interface):
|
||||
error_accounts = {}
|
||||
info = {}
|
||||
imported_statement_ids = []
|
||||
payment_lines = []
|
||||
|
||||
if statements:
|
||||
# Get default defaults
|
||||
@@ -635,8 +636,6 @@ class banking_import(wizard.interface):
|
||||
payment_line_ids = [x[0] for x in cursor.fetchall()]
|
||||
if payment_line_ids:
|
||||
payment_lines = payment_line_obj.browse(cursor, uid, payment_line_ids)
|
||||
else:
|
||||
payment_lines = []
|
||||
|
||||
for statement in statements:
|
||||
if statement.local_account in error_accounts:
|
||||
|
||||
Reference in New Issue
Block a user