From b00e65d872169602ab213852d81da5884383882f Mon Sep 17 00:00:00 2001 From: FilippoOlivo Date: Tue, 18 Nov 2025 17:08:22 +0100 Subject: [PATCH] fix collect_data --- pina/problem/abstract_problem.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pina/problem/abstract_problem.py b/pina/problem/abstract_problem.py index 7f99b52ec..057a62683 100644 --- a/pina/problem/abstract_problem.py +++ b/pina/problem/abstract_problem.py @@ -337,6 +337,10 @@ def collect_data(self): # If the condition does not have a domain attribute, store # the input and target points keys = condition.__slots__ - values = [getattr(condition, name) for name in keys] + values = [ + getattr(condition, name) + for name in keys + if getattr(condition, name) is not None + ] data[condition_name] = dict(zip(keys, values)) self._collected_data = data