1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-01 00:59:48 +00:00

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>
This commit is contained in:
Ed Bartosh
2015-12-09 19:56:38 -08:00
committed by Richard Purdie
parent c464f34d5b
commit 84daa40bc7
5 changed files with 13 additions and 14 deletions
+1 -1
View File
@@ -106,7 +106,7 @@ class BRLayer(models.Model):
layer_version = models.ForeignKey(Layer_Version, null=True)
class BRBitbake(models.Model):
req = models.ForeignKey(BuildRequest, unique = True) # only one bitbake for a request
req = models.OneToOneField(BuildRequest) # only one bitbake for a request
giturl = models.CharField(max_length =254)
commit = models.CharField(max_length = 254)
dirpath = models.CharField(max_length = 254)