Simplify WorkflowExecution model since it always has a task list

This commit is contained in:
Jean-Baptiste Barth 2015-10-11 22:06:27 +02:00
parent c310a04c74
commit 1ccadb169f

View File

@ -81,11 +81,11 @@ class WorkflowExecution(object):
def to_full_dict(self): def to_full_dict(self):
hsh = { hsh = {
"executionInfo": self.to_medium_dict(), "executionInfo": self.to_medium_dict(),
"executionConfiguration": {} "executionConfiguration": {
"taskList": {"name": self.task_list}
}
} }
#configuration #configuration
if hasattr(self, "task_list"):
hsh["executionConfiguration"]["taskList"] = {"name": self.task_list}
for key in self._configuration_keys: for key in self._configuration_keys:
attr = camelcase_to_underscores(key) attr = camelcase_to_underscores(key)
if not hasattr(self, attr): if not hasattr(self, attr):