Skip to content

Commit b1323c0

Browse files
dario-cosciaGiovanniCanali
authored andcommitted
fix collect_data (mathLab#706)
1 parent b4e25da commit b1323c0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pina/problem/abstract_problem.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,10 @@ def collect_data(self):
337337
# If the condition does not have a domain attribute, store
338338
# the input and target points
339339
keys = condition.__slots__
340-
values = [getattr(condition, name) for name in keys]
340+
values = [
341+
getattr(condition, name)
342+
for name in keys
343+
if getattr(condition, name) is not None
344+
]
341345
data[condition_name] = dict(zip(keys, values))
342346
self._collected_data = data

0 commit comments

Comments
 (0)