← Back to team overview

banking-addons-team team mailing list archive

[Merge] lp:~therp-nl/banking-addons/7.0-undefined_variables_ref_msg into lp:banking-addons

 

Stefan Rijnhart (Therp) has proposed merging lp:~therp-nl/banking-addons/7.0-undefined_variables_ref_msg into lp:banking-addons.

Requested reviews:
  Banking Addons Core Editors (banking-addons-team)

For more details, see:
https://code.launchpad.net/~therp-nl/banking-addons/7.0-undefined_variables_ref_msg/+merge/201293

A recent change revealed a bug in a code path that was never reached before, in which two variables are referenced that are not available in that code path.
-- 
https://code.launchpad.net/~therp-nl/banking-addons/7.0-undefined_variables_ref_msg/+merge/201293
Your team Banking Addons Core Editors is requested to review the proposed merge of lp:~therp-nl/banking-addons/7.0-undefined_variables_ref_msg into lp:banking-addons.
=== modified file 'account_banking/banking_import_transaction.py'
--- account_banking/banking_import_transaction.py	2014-01-06 11:59:22 +0000
+++ account_banking/banking_import_transaction.py	2014-01-11 16:10:32 +0000
@@ -255,9 +255,9 @@
         # creation. This also enables us to search for the invoice number in the
         # reference instead of the other way around, as most human interventions
         # *add* text.
+        ref = trans.reference.upper()
+        msg = trans.message.upper()
         if len(candidates) > 1 or not candidates:
-            ref = trans.reference.upper()
-            msg = trans.message.upper()
             # The manual usage of the sales journal creates moves that
             # are not tied to invoices. Thanks to Stefan Rijnhart for
             # reporting this.


Follow ups