Commit 0ce0b454 by Usman Khalid

Convert to OneToOneField.

parent 9d0052a0
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('submissions', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='scoresummary',
name='student_item',
field=models.OneToOneField(to='submissions.StudentItem'),
),
]
......@@ -227,7 +227,7 @@ class Score(models.Model):
class ScoreSummary(models.Model):
"""Running store of the highest and most recent Scores for a StudentItem."""
student_item = models.ForeignKey(StudentItem, unique=True)
student_item = models.OneToOneField(StudentItem)
highest = models.ForeignKey(Score, related_name="+")
latest = models.ForeignKey(Score, related_name="+")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment