From d0abc15931ff2fb8153013fc73a96b5d304cae93 Mon Sep 17 00:00:00 2001 From: Unai Beristain Date: Wed, 11 Dec 2024 11:29:50 +0100 Subject: [PATCH] [IMP] mgmtsystem_audit: Improve Expected singleton error --- mgmtsystem_audit/models/mgmtsystem_audit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mgmtsystem_audit/models/mgmtsystem_audit.py b/mgmtsystem_audit/models/mgmtsystem_audit.py index 30cf0002e2d..96d6d263558 100644 --- a/mgmtsystem_audit/models/mgmtsystem_audit.py +++ b/mgmtsystem_audit/models/mgmtsystem_audit.py @@ -108,7 +108,7 @@ class MgmtSystemAudit(models.Model): def _compute_number_of_nonconformities(self): """Count number of nonconformities.""" for audit in self: - audit.number_of_nonconformities = len(self.nonconformity_ids) + audit.number_of_nonconformities = len(audit.nonconformity_ids) @api.depends("imp_opp_ids") def _compute_number_of_improvement_opportunities(self):