diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2015-12-09 19:56:38 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-12-14 23:13:07 +0000 |
commit | 84daa40bc7600df75d93db358be94cac10452936 (patch) | |
tree | d23c913ca773bd04720e0cbfe6a98a199cee3dec /bitbake/lib/toaster/bldcontrol/models.py | |
parent | c464f34d5bd3aa4119aa3d1591ee7d55afe9b35f (diff) | |
download | poky-84daa40bc7600df75d93db358be94cac10452936.tar.gz |
bitbake: toaster: use OneToOneField instead of ForeignKey
Used OneToOneField to reference BuildRequest in BRBitbake model.
Fixed django warning:
WARNINGS: Setting unique=True on a ForeignKey has the same effect
as using a OneToOneField.
(Bitbake rev: aaa4319ebbb06facb77b4ba936cf3aa2068ff238)
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/bldcontrol/models.py')
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/models.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/models.py b/bitbake/lib/toaster/bldcontrol/models.py index ab41105303..a3a49ce472 100644 --- a/bitbake/lib/toaster/bldcontrol/models.py +++ b/bitbake/lib/toaster/bldcontrol/models.py | |||
@@ -106,7 +106,7 @@ class BRLayer(models.Model): | |||
106 | layer_version = models.ForeignKey(Layer_Version, null=True) | 106 | layer_version = models.ForeignKey(Layer_Version, null=True) |
107 | 107 | ||
108 | class BRBitbake(models.Model): | 108 | class BRBitbake(models.Model): |
109 | req = models.ForeignKey(BuildRequest, unique = True) # only one bitbake for a request | 109 | req = models.OneToOneField(BuildRequest) # only one bitbake for a request |
110 | giturl = models.CharField(max_length =254) | 110 | giturl = models.CharField(max_length =254) |
111 | commit = models.CharField(max_length = 254) | 111 | commit = models.CharField(max_length = 254) |
112 | dirpath = models.CharField(max_length = 254) | 112 | dirpath = models.CharField(max_length = 254) |