credativ team mailing list archive
-
credativ team
-
Mailing list archive
-
Message #00061
[Merge] lp:~credativ/account-banking/fix-variable-error into lp:account-banking/5.0
Dmitrijs Ledkovs (credativ) has proposed merging lp:~credativ/account-banking/fix-variable-error into lp:account-banking/5.0.
Requested reviews:
Pieter J. Kersten (EduSense BV) (pieterj)
For more details, see:
https://code.launchpad.net/~credativ/account-banking/fix-variable-error/+merge/80913
[FIX] UnboundLocalError: local variable 'payment_lines' referenced before assignment
When trying to import first statement and no other statements are present.
--
https://code.launchpad.net/~credativ/account-banking/fix-variable-error/+merge/80913
Your team Credativ is subscribed to branch lp:~credativ/account-banking/fix-variable-error.
=== modified file 'account_banking/wizard/bank_import.py'
--- account_banking/wizard/bank_import.py 2011-05-05 10:29:28 +0000
+++ account_banking/wizard/bank_import.py 2011-11-01 15:04:24 +0000
@@ -598,6 +598,7 @@
error_accounts = {}
info = {}
imported_statement_ids = []
+ payment_lines = []
if statements:
# Get default defaults
@@ -635,8 +636,6 @@
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:
Follow ups