From d9dc38947c88f211f7deef2454f3a15251ed23d3 Mon Sep 17 00:00:00 2001 From: zorun Date: Sun, 26 Apr 2020 14:22:54 +0200 Subject: Fix string representation of bills (#584) Currently the string representation of a Bill is: " for " It is used in the History Page to describe changes that were applied to Bills, for instance: Bill "42.0 for Test" renamed to "Another Test" This is inconsistent, not easy to read, and the "for" in the middle is not translatable. To solve this issue, simply switch the string representation of a bill to its description. Co-authored-by: Baptiste Jonglez --- ihatemoney/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ihatemoney/models.py') diff --git a/ihatemoney/models.py b/ihatemoney/models.py index dca8611..742bc8c 100644 --- a/ihatemoney/models.py +++ b/ihatemoney/models.py @@ -460,7 +460,7 @@ class Bill(db.Model): return 0 def __str__(self): - return f"{self.amount} for {self.what}" + return self.what def __repr__(self): return ( -- cgit v1.1