1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-02 01:19:52 +00:00

bitbake: toaster: Replace references to LayerSource models

Replace references to the now deprecated layersource models across
Toaster with the new enums for layer source types.

(Bitbake rev: 48c09c62eb979d840132e58144f0d81ffee675b1)

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>
This commit is contained in:
Michael Wood
2016-07-21 14:43:27 +01:00
committed by Richard Purdie
parent ffc78d329d
commit ef627d0ab8
7 changed files with 57 additions and 53 deletions
+2 -4
View File
@@ -147,7 +147,7 @@ class XhrLayer(View):
layer_version = Layer_Version.objects.get(
id=kwargs['layerversion_id'],
project=kwargs['pid'],
layer_source__sourcetype=LayerSource.TYPE_IMPORTED)
layer_source=LayerSource.TYPE_IMPORTED)
except Layer_Version.DoesNotExist:
return error_response("Cannot find imported layer to update")
@@ -159,8 +159,6 @@ class XhrLayer(View):
if "commit" in request.POST:
layer_version.commit = request.POST["commit"]
layer_version.branch = request.POST["commit"]
if "up_branch" in request.POST:
layer_version.up_branch_id = int(request.POST["up_branch"])
if "summary" in request.POST:
layer_version.layer.summary = request.POST["summary"]
if "description" in request.POST:
@@ -193,7 +191,7 @@ class XhrLayer(View):
layer_version = Layer_Version.objects.get(
id=kwargs['layerversion_id'],
project=kwargs['pid'],
layer_source__sourcetype=LayerSource.TYPE_IMPORTED)
layer_source=LayerSource.TYPE_IMPORTED)
except Layer_Version.DoesNotExist:
return error_response("Cannot find imported layer to delete")