From 450ebfbf20ae02e54db9266c6c9cda7395f49adc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 25 Oct 2020 11:02:23 +0100 Subject: [PATCH] Use getattr instead of testing origin id Since changeset b8d76b07910f, the reference value of a negative id is a string so testing the id does not work. It is safer to call getattr with a default empty string value. issue9500 review304611002 --- general_ledger.fodt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/general_ledger.fodt b/general_ledger.fodt index 73768a00db..a023603de1 100644 --- a/general_ledger.fodt +++ b/general_ledger.fodt @@ -964,7 +964,7 @@ <line.description or ''><line.move_description or ''> - <line.origin.rec_name if line.origin and line.origin.id >= 0 else ''> + <getattr(line.origin, 'rec_name', '')> <line.state_string>