#3870 (InvalidOperation decimal.DivisionUndefined in debts/BudgetsByPartner)
by Luc Saffre · in Developers · assigned to Luc Saffre
Summary
Children
Comments
- 5 years, 10 months ago by Luc Saffre about #3870 (InvalidOperation decimal.DivisionUndefined in debts/BudgetsByPartner) : I could reproduce it manually: either mark two entries in LiabilitiesByBudget as being distributed (Entry.distribute=True) and have their total be 0. This makes the DistByBudget table get confused when it tries to compute the percentage of each entry. I fixed the issue for my manually produced case. ...
- 5 years, 10 months ago by Luc Saffre about #3870 (InvalidOperation decimal.DivisionUndefined in debts/BudgetsByPartner) : Yes, the code in lino_welfare/modlib/debts/ui.py", line 684, get_data_rows() obviously forgets the case when total is zero. But I'd like to reproduce the problem and increase coverage before fixing this.