From 4530206c0759daca99eee03ba718fe83464b846c Mon Sep 17 00:00:00 2001 From: Mohamed-Hacene Date: Wed, 9 Oct 2024 14:47:12 +0200 Subject: [PATCH] fix : test_create_applied_controls_from_suggestions --- backend/core/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/core/models.py b/backend/core/models.py index 7a570a44c..f3e148f16 100644 --- a/backend/core/models.py +++ b/backend/core/models.py @@ -2621,7 +2621,8 @@ def create_applied_controls_from_suggestions(self) -> list[AppliedControl]: exc_info=e, ) continue - self.applied_controls.add(applied_controls) + if applied_controls: + self.applied_controls.add(applied_controls) return applied_controls class Meta: