Skip to content

Commit 9f4214e

Browse files
committed
Fix error found in tests.
1 parent 60850e2 commit 9f4214e

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

ads/opctl/conda/cmds.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -200,13 +200,15 @@ def _create(
200200
manifest["manifest"]["manifest_version"] = "1.0"
201201

202202
logger.info(f"Creating conda environment {slug}")
203-
conda_dep["manifest"].update(
204-
{
205-
k: manifest["manifest"][k]
206-
for k in manifest["manifest"]
207-
if manifest["manifest"][k]
208-
}
209-
)
203+
manifest_dict = {
204+
k: manifest["manifest"][k]
205+
for k in manifest["manifest"]
206+
if manifest["manifest"][k]
207+
}
208+
if "manifest" in conda_dep:
209+
conda_dep["manifest"].update(manifest_dict)
210+
else:
211+
conda_dep["manifest"] = manifest_dict
210212
logger.info(f"Updated conda environment manifest: {conda_dep.get('manifest')}")
211213

212214
if is_in_notebook_session() or NO_CONTAINER:

0 commit comments

Comments
 (0)