index by bug id
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 7 May 2021 14:10:17 +0000 (15:10 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 7 May 2021 14:10:17 +0000 (15:10 +0100)
src/budget_sync/main.py

index 5075603f308c7cd91b755e43dee9a7e77b0e0816..53842058c4e73eebe7f8e2f0f0acd54b88e530ee 100644 (file)
@@ -107,9 +107,9 @@ def main():
         milestone_headings[milestone] = headings
         # now we go through the whole "payments" thing again...
         for payment in payments:
-            row = milestone_csvs[milestone].get(payment.node.id, None)
+            row = milestone_csvs[milestone].get(payment.node.bug.id, None)
             if row is None:
-                row = {'bug_id': payment.node.id}
+                row = {'bug_id': payment.node.bug.id}
 
             name = str(payment.payee.identifier).replace(" ", "_")
             row[name+"_amount"] = str(payment.amount)
@@ -125,7 +125,7 @@ def main():
             row[name+"_paid"] = paid
 
             print (row)
-            milestone_csvs[milestone][payment.node.id] = row
+            milestone_csvs[milestone][payment.node.bug.id] = row
 
     if args.output_dir is not None:
         with open("%s/csvs.mdwn" % args.output_dir, "w") as f: