Do a OneToOne with UnifiedJob.

This commit is contained in:
Luke Sneeringer 2014-10-07 09:54:06 -05:00
parent f6a501bb28
commit e23801313e

View File

@ -46,7 +46,7 @@ class JobOrigin(models.Model):
This is fine, and code should be able to handle it. A job with no origin
is always assumed to *not* have the current instance as its origin.
"""
unified_job = models.ForeignKey(UnifiedJob)
unified_job = models.OneToOneField(UnifiedJob, related_name='job_origin')
instance = models.ForeignKey(Instance)
created = models.DateTimeField(auto_now_add=True)
modified = models.DateTimeField(auto_now=True)