Merge lp:~credativ/account-banking/fix-variable-error into lp:account-banking/5.0

Proposed by Dimitri John Ledkov (ex-credativ)
Status: Merged
Merged at revision: 67
Proposed branch: lp:~credativ/account-banking/fix-variable-error
Merge into: lp:account-banking/5.0
Diff against target: 20 lines (+1/-2)
1 file modified
account_banking/wizard/bank_import.py (+1/-2)
To merge this branch: bzr merge lp:~credativ/account-banking/fix-variable-error
Reviewer Review Type Date Requested Status
Pieter J. Kersten (EduSense BV) Disapprove
Review via email: mp+80913@code.launchpad.net

Description of the change

  [FIX] UnboundLocalError: local variable 'payment_lines' referenced before assignment

  When trying to import first statement and no other statements are present.

To post a comment you must log in.
Revision history for this message
Pieter J. Kersten (EduSense BV) (pieterj) wrote :

Fixed in 64.

review: Disapprove
Revision history for this message
Dimitri John Ledkov (ex-credativ) (dle-credativ) wrote :

rev67 on 5.0 =)

Thanks.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_banking/wizard/bank_import.py'
2--- account_banking/wizard/bank_import.py 2011-05-05 10:29:28 +0000
3+++ account_banking/wizard/bank_import.py 2011-11-01 15:07:25 +0000
4@@ -598,6 +598,7 @@
5 error_accounts = {}
6 info = {}
7 imported_statement_ids = []
8+ payment_lines = []
9
10 if statements:
11 # Get default defaults
12@@ -635,8 +636,6 @@
13 payment_line_ids = [x[0] for x in cursor.fetchall()]
14 if payment_line_ids:
15 payment_lines = payment_line_obj.browse(cursor, uid, payment_line_ids)
16- else:
17- payment_lines = []
18
19 for statement in statements:
20 if statement.local_account in error_accounts:

Subscribers

People subscribed via source and target branches