From e23801313e61377d73ac6289bca1555a3b23f041 Mon Sep 17 00:00:00 2001 From: Luke Sneeringer Date: Tue, 7 Oct 2014 09:54:06 -0500 Subject: [PATCH] Do a OneToOne with UnifiedJob. --- awx/main/models/ha.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/models/ha.py b/awx/main/models/ha.py index cf460c7aaf..145b556d87 100644 --- a/awx/main/models/ha.py +++ b/awx/main/models/ha.py @@ -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)