We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa787b1 commit 94770e7Copy full SHA for 94770e7
schools/views.py
@@ -215,8 +215,9 @@ def new_assignment(request):
215
education_service = EducationService(user.tenant_id, token)
216
dueDate = post["duedate"] + "T" + post["duetime"] + "Z"
217
dueDateUTC=datetime.strptime(dueDate,"%m/%d/%YT%H:%M %pZ").strftime("%Y-%m-%dT%H:%M:%SZ")
218
- result = education_service.add_assignment(post["classId"],post["name"],dueDateUTC)
219
- assignment = json.loads(result.content)
+ result = education_service.add_assignment(post["classId"],post["name"],dueDateUTC)
+ jsonContent = result.content.decode('utf8')
220
+ assignment = json.loads(jsonContent)
221
if post['status']=="assigned":
222
education_service.publish_assignment(post["classId"],assignment["id"])
223
0 commit comments