From 0e19b2a41fc905e5e4a0da6a11a2eb71640308f8 Mon Sep 17 00:00:00 2001 From: Hans Henrik Gabelgaard Date: Wed, 11 Oct 2023 10:14:42 +0200 Subject: [PATCH] [FIX] membership_extension: No return on super call With the return we only got the state computed for the first line in self --- membership_extension/models/membership_line.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/membership_extension/models/membership_line.py b/membership_extension/models/membership_line.py index 18646c40b..c6ce7d5a2 100644 --- a/membership_extension/models/membership_line.py +++ b/membership_extension/models/membership_line.py @@ -43,6 +43,8 @@ def _onchange_membership_date(self): self.date_to = date_to def _compute_state(self): + # Compute methods should not return + # pylint: disable=missing-return for line in self: if isinstance(line.id, models.NewId) or not line.account_invoice_id: line.state = line.state or "none" @@ -52,7 +54,7 @@ def _compute_state(self): ): line.state = "canceled" else: - return super(MembershipLine, line)._compute_state() + super(MembershipLine, line)._compute_state() # Empty method _inverse_state def _inverse_state(self):