From: Jacob Lifshay Date: Thu, 23 Sep 2021 02:23:58 +0000 (-0700) Subject: fix logical errors caused by breaking the assumption that there X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a41c7d2522c9a7367b232c1adc069dd6aa8b3ad2;p=utils.git fix logical errors caused by breaking the assumption that there will be at most one payment per person-bug combination. split "donated" out into separate user from lkcl --- diff --git a/budget-sync-config.toml b/budget-sync-config.toml index 3f3c0b7..dbbdd68 100644 --- a/budget-sync-config.toml +++ b/budget-sync-config.toml @@ -7,9 +7,16 @@ output_markdown_file = "programmerjake.mdwn" [people."Luke Kenneth Casson Leighton"] email = "lkcl@lkcl.net" -aliases = ["lkcl", "donated", "luke", "Luke", "Luke Leighton"] +aliases = ["lkcl", "luke", "Luke", "Luke Leighton"] output_markdown_file = "lkcl.mdwn" +# for "donated" user, since budget-sync logically +# depends on each person being paid at most once per bug +[people."Luke Kenneth Casson Leighton (donated)"] +email = "donated@lkcl.net" +aliases = ["donated"] +output_markdown_file = "lkcl-donated.mdwn" + [people."NLnet 2019-10P"] email = "2019-10P@nlnet.nl" aliases = [] diff --git a/src/budget_sync/budget_graph.py b/src/budget_sync/budget_graph.py index e2824ee..bfc1d1f 100644 --- a/src/budget_sync/budget_graph.py +++ b/src/budget_sync/budget_graph.py @@ -654,8 +654,9 @@ class BudgetGraph: payment.payee previous_payment = payee_payments.get(payment.payee) if previous_payment is not None: - # NOT AN ERROR - print("NOT AN ERROR", BudgetGraphDuplicatePayeesForTask( + # is an error because budget-sync depends on there + # being at most 1 payment per person-bug combination + errors.append(BudgetGraphDuplicatePayeesForTask( node.bug.id, root.bug.id, previous_payment[-1].payee_key, payment.payee_key)) payee_payments[payment.payee].append(payment)