Skip to content

Commit 111a4ab

Browse files
committed
redo Problem.__getstate__ again...
1 parent 4d6641b commit 111a4ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pymoo/model/problem.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ def __getstate__(self):
463463

464464
# If the parallelization is starmap,
465465
# we can't pickle self with the starmapper function.
466-
if state.get("parallelization", [None])[0] == "starmap":
466+
if state["parallelization"] is not None and state["parallelization"][0] == "starmap":
467467
state["parallelization"] = None
468468

469469
return state

0 commit comments

Comments
 (0)