previous_payment now a list
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 24 Apr 2021 17:50:44 +0000 (18:50 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 24 Apr 2021 17:50:44 +0000 (18:50 +0100)
src/budget_sync/budget_graph.py

index 3e417f360cfe2794cb9fc39efd1b6bcb572a5e81..a6de7a734feb17e5e9cdf27687986d5db5774097 100644 (file)
@@ -589,12 +589,11 @@ class BudgetGraph:
                 payment.payee
                 previous_payment = payee_payments.get(payment.payee)
                 if previous_payment is not None:
-                    payee_payments[payment.payee].append(payment)
                     # NOT AN ERROR
                     print ("NOT AN ERROR", BudgetGraphDuplicatePayeesForTask(
                            node.bug.id, root.bug.id,
-                           previous_payment.payee_key, payment.payee_key
-                    ))
+                           previous_payment[-1].payee_key, payment.payee_key))
+                    payee_payments[payment.payee].append(payment)
                 else:
                     payee_payments[payment.payee] = [payment]
             except BudgetGraphBaseError as e: