Я не получил никакой ошибки, но я знаю, что запись сохранения в базе данных неверна, это ошибка в getlist ()? или я что-то пропустил в коде? скажите, пожалуйста, почему неправильная запись записи в базе данных
def corevalues(request):
coregradelevel = request.GET.get('coregradelevel')
coreperiod = request.GET.get('coreperiod')
marking = StudentBehaviorMarking.objects.all()
teacher = request.GET.get('teacher')
corevalues = CoreValues.objects.all().order_by('Display_Sequence')
corevaluesdescription = CoreValuesDescription.objects.values('id','Description').distinct('Description').order_by('Description')
corevaluesperiod = CoreValuesDescription.objects.filter(grading_Period=coreperiod).order_by('Display_Sequence')
period = gradingPeriod.objects.filter(id=coreperiod).order_by('Display_Sequence')
gradelevel = EducationLevel.objects.filter(id__in = coregradelevel).distinct().order_by('id')
studentcorevalues = StudentsCoreValuesDescription.objects.filter(Teacher = teacher).filter(GradeLevel = gradelevel.values_list('Description'))\
.values('Students_Enrollment_Records').distinct('Students_Enrollment_Records').order_by('Students_Enrollment_Records')
student = StudentPeriodSummary.objects.filter(Teacher = teacher).filter(GradeLevel__in = gradelevel.values_list('id'))
это мой html код
<table class="tblcore">
<tr>
<td rowspan="2" colspan="2">Core Values</td>
{% for core in corevalues %}
<td colspan="8"><input type="hidden" value="{{core.id}}" name="core">{{core.Description}}</td>
{% endfor %}
</tr>
<tr>
{% for corevalues in corevaluesperiod %}
<td colspan="4" style="font-size: 12px"><input type="hidden" value="{{corevalues.id}}" name="coredescription">{{corevalues.Description}}</td>
{% endfor %}
</tr>
<tr>
<td colspan="2">Student's Name</td>
{% for corevalues in period %}
<td colspan="4">
<input type="hidden" value="{{corevalues.id}}" name="coreperiod">Q {{corevalues.id}}
</td>
<td colspan="4">
<input type="hidden" value="{{corevalues.id}}" name="coreperiod">Q {{corevalues.id}}
</td>
<td colspan="4">
<input type="hidden" value="{{corevalues.id}}" name="coreperiod">Q {{corevalues.id}}
</td>
<td colspan="4">
<input type="hidden" value="{{corevalues.id}}" name="coreperiod">Q {{corevalues.id}}
</td>
<td colspan="4">
<input type="hidden" value="{{corevalues.id}}" name="coreperiod">Q {{corevalues.id}}
</td>
<td colspan="4">
<input type="hidden" value="{{corevalues.id}}" name="coreperiod">Q {{corevalues.id}}
</td>
<td colspan="4">
<input type="hidden" value="{{corevalues.id}}" name="coreperiod">Q {{corevalues.id}}
</td>
{% endfor %}
</tr>
{% for students in student %}
<tr>
<td colspan="2"><input type="hidden" value="{{students.id}}" name="student">{{students.Students_Enrollment_Records.Students_Enrollment_Records.Students_Enrollment_Records.Student_Users}}</td>
<td colspan="4">
<select name="marking">
<option>--------</option>
{% for m in marking %}
<option value="{{m.Marking}}" name="marking">{{m.Marking}}</option>
{% endfor %}
</select>
</td>
<td colspan="4">
<select>
<option>--------</option>
{% for m in marking %}
<option value="{{m.id}}">{{m.Marking}}</option>
{% endfor %}
</select>
</td>
<td colspan="4">
<select>
<option>--------</option>
{% for m in marking %}
<option value="{{m.id}}">{{m.Marking}}</option>
{% endfor %}
</select>
</td>
<td colspan="4">
<select>
<option>--------</option>
{% for m in marking %}
<option value="{{m.id}}">{{m.Marking}}</option>
{% endfor %}
</select>
</td>
<td colspan="4">
<select>
<option>--------</option>
{% for m in marking %}
<option value="{{m.id}}">{{m.Marking}}</option>
{% endfor %}
</select>
</td>
<td colspan="4">
<select>
<option>--------</option>
{% for m in marking %}
<option value="{{m.id}}">{{m.Marking}}</option>
{% endfor %}
</select>
</td>
<td colspan="4">
<select>
<option>--------</option>
{% for m in marking %}
<option value="m.id">{{m.Marking}}</option>
{% endfor %}
</select>
</td>
</tr>
{% endfor %}
</table>
это то, что выглядит как

это мой код для вставки данных
global marking,coreperiod,corevalues
id = request.POST.get('teacher')
teacher = EmployeeUser(id=id)
coreid = request.POST.get('core')
core = CoreValues(id=coreid)
corevalues = []
for corevaluesid in request.POST.getlist('coredescription'):
corevalues.append(corevaluesid)
coreperiodID = request.POST.get('coreperiod')
coreperiod = gradingPeriod(id = coreperiodID)
marking = []
for markingID in request.POST.getlist('marking'):
marking.append(markingID)
print(markingID)
for desc,m in enumerate(request.POST.getlist('marking')):
coredesc = corevalues[desc]
print(corevalues[desc])
coredescription = CoreValuesDescription(id=coredesc)
print("behavior",m)
for student in request.POST.getlist('student'):
students = StudentPeriodSummary(id=student)
V_insert_data = StudentsCoreValuesDescription(
Core_Values=coredescription,
Marking=m,
Students_Enrollment_Records=students,
grading_Period = coreperiod,
)
V_insert_data.save()
Я не получил никакой ошибки, но 