Skip to content

Commit e5dd936

Browse files
committedApr 20, 2017
[processing] fixed I/O of models
1 parent 54e30b9 commit e5dd936

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎python/plugins/processing/modeler/ModelerAlgorithm.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ def getParameterDescriptions(self):
573573
return descs
574574

575575
def todict(self):
576-
keys = ["inputs", "group", "name", "algs", "helpContent"]
576+
keys = ["inputs", "_group", "_name", "algs", "helpContent"]
577577
return {k: v for k, v in list(self.__dict__.items()) if k in keys}
578578

579579
def toJson(self):
@@ -632,7 +632,8 @@ def _import(name):
632632
except Exception as e:
633633
raise WrongModelException(e.args[0])
634634

635-
model._name = model.modeler_name
635+
if hasattr(model, "modeler_name"):
636+
model._name = model.modeler_name
636637
return model
637638

638639
@staticmethod

0 commit comments

Comments
 (0)
Please sign in to comment.