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