Skip to content

Commit 5615dc3

Browse files
committed
filter out modules in clean.
1 parent 6808441 commit 5615dc3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

SpiffWorkflow/bpmn/serializer/helpers/registry.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
1818
# 02110-1301 USA
1919

20+
from types import ModuleType
2021
from uuid import UUID
2122
from datetime import datetime, timedelta
2223

@@ -60,6 +61,6 @@ def clean(self, obj):
6061
the preprocessed object
6162
"""
6263
if isinstance(obj, dict):
63-
return dict((k, v) for k, v in obj.items() if not callable(v))
64+
return dict((k, v) for k, v in obj.items() if not callable(v) and not isinstance(v, ModuleType))
6465
else:
6566
return obj

0 commit comments

Comments
 (0)