Some issues with the migration project but I'll need to test them tomorrow... might have to create courses even if courses already exist?

This commit is contained in:
Norm Rasmussen
2024-09-02 20:42:31 -04:00
parent 6323f577de
commit 0c3af4c0fd
4 changed files with 69 additions and 32 deletions

View File

@ -168,13 +168,15 @@ def check_resources():
def create_project_item():
project_name = "Mark Course as Complete"
project_name = "Testing Course"
item_name = "Courses to Mark as Complete"
proj_payload = {
"data": {
"data":
{
"type": "migration_projects",
"attributes": {"name": project_name},
}
}
proj_full_url = f"{baseurl}/migration/{PROJ_URL}"
print(proj_full_url)
@ -184,10 +186,14 @@ def create_project_item():
item_full_url = f"{baseurl}/migration/{PROJ_URL}/{PROJ_ID}/{ITEM_URL}"
item_payload = {
"data": {
"data":
{
"type": "migration_items",
"attributes": {"type": "courses"},
"attributes": {
"type": "courses"
},
}
}
item_return = Calls.post(item_full_url, item_payload)
ITEM_ID = item_return["data"]["id"]