Commit 7f67ca86 authored by Romain Therville's avatar Romain Therville 🐭
Browse files

2nd fix for issue#124

parent 2c4e618e
......@@ -42,6 +42,7 @@ class BasicNG6Workflow (Workflow):
self.add_parameter("admin_login", "Who is the project administrator", required = True, type = 'ng6userlogin', display_name="Admin login")
def add_component(self, component_name, args=[], kwargs={}, component_prefix="default", parent=None, addto="run"):
logging.getLogger("ng6").debug("addto, logging test 1")
# first build and check if this component is OK
if component_name in self.internal_components or component_name in self.external_components:
......@@ -65,11 +66,15 @@ class BasicNG6Workflow (Workflow):
if derived_class.__name__ == "Analysis":
# add parent and project/run information
cmpt_object.parent = parent
if addto == "project": cmpt_object.project = self.project
elif addto == "run": cmpt_object.run = self.runobj
#We replace the default space_id
if cmpt_object.space_id == "default" and cmpt_object.space_id != cmpt_object.run.space_id:
cmpt_object.space_id = cmpt_object.run.space_id
if addto == "project":
cmpt_object.project = self.project
cmpt_object.space_id = cmpt_object.project.space_id
elif addto == "run":
cmpt_object.run = self.runobj
#We replace the default space_id
if cmpt_object.space_id == "default":
cmpt_object.space_id = cmpt_object.run.space_id
logging.getLogger("ng6").debug("addto, logging test 2")
# link analysis with ots create user
cmpt_object.admin_login = self.admin_login
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment