29👍
✅
TypeError: 'StudentSubjectGrade' object is not subscriptable
this means that student
is not a dictionary, you cannot use student['key']
to get what you want.
you should use student.sth
instead.
Source:stackexchange.com