summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/views.py
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2016-07-21 14:43:30 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-26 08:10:36 +0100
commit97278fb51c3d4fe46c2a3110015e291fdc5d502d (patch)
tree2535f7584e2ccc4390ecfbaf16031e8b8886e4c5 /bitbake/lib/toaster/toastergui/views.py
parent8b3146007f98ba6618662cc47ed1c1491ef8945a (diff)
downloadpoky-97278fb51c3d4fe46c2a3110015e291fdc5d502d.tar.gz
bitbake: toaster: orm Remove the layerindex specific up_branch fields
We don't need to keep track of layerindex data in our database. And using branch==release is very confusing in the schema. Instead use the existing Release definition to keep track of which release a layer_version is for. Remove the Branch model and all references to it. Create a migration path to convert from up_branches to their corresponding releases. (Bitbake rev: f8f4cffe6fd371f3a7e63690c68f3fcb5dc1f297) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/views.py')
-rwxr-xr-xbitbake/lib/toaster/toastergui/views.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
index d19815f661..a40ceef942 100755
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -161,7 +161,7 @@ def _lv_to_dict(prj, x = None):
161 return {"id": x.pk, 161 return {"id": x.pk,
162 "name": x.layer.name, 162 "name": x.layer.name,
163 "tooltip": "%s | %s" % (x.layer.vcs_url,x.get_vcs_reference()), 163 "tooltip": "%s | %s" % (x.layer.vcs_url,x.get_vcs_reference()),
164 "detail": "(%s" % x.layer.vcs_url + (")" if x.up_branch == None else " | "+x.get_vcs_reference()+")"), 164 "detail": "(%s" % x.layer.vcs_url + (")" if x.release == None else " | "+x.get_vcs_reference()+")"),
165 "giturl": x.layer.vcs_url, 165 "giturl": x.layer.vcs_url,
166 "layerdetailurl" : reverse('layerdetails', args=(prj.id,x.pk)), 166 "layerdetailurl" : reverse('layerdetails', args=(prj.id,x.pk)),
167 "revision" : x.get_vcs_reference(), 167 "revision" : x.get_vcs_reference(),
@@ -1288,7 +1288,7 @@ if True:
1288 from django.contrib.auth import authenticate, login 1288 from django.contrib.auth import authenticate, login
1289 from django.contrib.auth.decorators import login_required 1289 from django.contrib.auth.decorators import login_required
1290 1290
1291 from orm.models import Branch, LayerSource, ToasterSetting, Release, Machine, LayerVersionDependency 1291 from orm.models import LayerSource, ToasterSetting, Release, Machine, LayerVersionDependency
1292 from bldcontrol.models import BuildRequest 1292 from bldcontrol.models import BuildRequest
1293 1293
1294 import traceback 1294 import traceback
@@ -1667,9 +1667,6 @@ if True:
1667 post_data[key] = val.strip() 1667 post_data[key] = val.strip()
1668 1668
1669 1669
1670 # We need to know what release the current project is so that we
1671 # can set the imported layer's up_branch_id
1672
1673 try: 1670 try:
1674 layer, layer_created = Layer.objects.get_or_create(name=post_data['name']) 1671 layer, layer_created = Layer.objects.get_or_create(name=post_data['name'])
1675 except MultipleObjectsReturned: 1672 except MultipleObjectsReturned:
@@ -1759,7 +1756,6 @@ if True:
1759 1756
1760 return HttpResponse(jsonfilter(json_response), content_type = "application/json") 1757 return HttpResponse(jsonfilter(json_response), content_type = "application/json")
1761 1758
1762
1763 @xhr_response 1759 @xhr_response
1764 def xhr_customrecipe(request): 1760 def xhr_customrecipe(request):
1765 """ 1761 """