Skip to content

Commit dc9b090

Browse files
committed
fixed existing subprojects not added
1 parent 6b50f9e commit dc9b090

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

examples/client/multi-image/manage_project_structure.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,14 @@ def create_and_add_child_projects(version, args):
252252
else:
253253
logging.info(f"Child project {project['name']} with version {args.version_name} found.")
254254
logging.info(f"Recursively removing codelocations for {project['name']} with version {args.version_name} ")
255+
try:
256+
logging.info(f"Adding project {child} {args.version_name} to the parent project")
257+
child_version_url = version['_meta']['href']
258+
response = bd.session.post(version_url,json={'component': child_version_url})
259+
logging.info(f"Adding {child} : {args.version_name} to parent project completed with {response}")
260+
except Exception as e:
261+
logging.info(f"Adding {child} : {args.version_name} to parent project completed with exception {e}")
262+
255263
remove_codelocations_recursively(version)
256264
else:
257265
response = create_project_version(child,args.version_name, args, nickname=container_spec)

0 commit comments

Comments
 (0)