Skip to content

Commit

Permalink
fix loading of models containing user-defined scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Dec 5, 2016
1 parent f4c99d9 commit 3ebc6db
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/plugins/processing/modeler/ModelerAlgorithm.py
Expand Up @@ -582,7 +582,10 @@ def fromJson(s):
def fromdict(d):
try:
fullClassName = d["class"]
tokens = fullClassName.split(".")
if isinstance(fullClassName, basestring):
tokens = fullClassName.split(".")
else:
tokens = fullClassName.__class__.__name__.split(".")
className = tokens[-1]
moduleName = ".".join(tokens[:-1])
values = d["values"]
Expand Down

0 comments on commit 3ebc6db

Please sign in to comment.