Skip to content

Commit ba3dbe5

Browse files
committed
Update model migration example to create a project if none exists on the target server.
1 parent e6f3b1a commit ba3dbe5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

examples/viya35_to_viya4_model_migration.ipynb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@
170170
" convert_model_zip(path)\n",
171171
" \n",
172172
" project4 = mr.get_project(project4)\n",
173+
" # If no project is found, create a new one\n",
174+
" if not project4:\n",
175+
" project4 = mr.create_project(project4)\n",
173176
"\n",
174177
" # List all files in directory\n",
175178
" files = [x for x in path.glob(\"**/*\") if x.is_file()]\n",

0 commit comments

Comments
 (0)