diff options
| author | Michael Wood <michael.g.wood@intel.com> | 2016-07-21 14:43:27 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-07-26 08:10:36 +0100 |
| commit | ef627d0ab8f5cf2fc72005393e76047cb623ff3d (patch) | |
| tree | ae0067545010621d688baea77197ec50c7db7acc /bitbake/lib/toaster/toastergui/api.py | |
| parent | ffc78d329d6fed9ae9a0db470d30033069b42f8f (diff) | |
| download | poky-ef627d0ab8f5cf2fc72005393e76047cb623ff3d.tar.gz | |
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>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/api.py')
| -rw-r--r-- | bitbake/lib/toaster/toastergui/api.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/toastergui/api.py b/bitbake/lib/toaster/toastergui/api.py index 112ce58914..414afce1d0 100644 --- a/bitbake/lib/toaster/toastergui/api.py +++ b/bitbake/lib/toaster/toastergui/api.py | |||
| @@ -147,7 +147,7 @@ class XhrLayer(View): | |||
| 147 | layer_version = Layer_Version.objects.get( | 147 | layer_version = Layer_Version.objects.get( |
| 148 | id=kwargs['layerversion_id'], | 148 | id=kwargs['layerversion_id'], |
| 149 | project=kwargs['pid'], | 149 | project=kwargs['pid'], |
| 150 | layer_source__sourcetype=LayerSource.TYPE_IMPORTED) | 150 | layer_source=LayerSource.TYPE_IMPORTED) |
| 151 | 151 | ||
| 152 | except Layer_Version.DoesNotExist: | 152 | except Layer_Version.DoesNotExist: |
| 153 | return error_response("Cannot find imported layer to update") | 153 | return error_response("Cannot find imported layer to update") |
| @@ -159,8 +159,6 @@ class XhrLayer(View): | |||
| 159 | if "commit" in request.POST: | 159 | if "commit" in request.POST: |
| 160 | layer_version.commit = request.POST["commit"] | 160 | layer_version.commit = request.POST["commit"] |
| 161 | layer_version.branch = request.POST["commit"] | 161 | layer_version.branch = request.POST["commit"] |
| 162 | if "up_branch" in request.POST: | ||
| 163 | layer_version.up_branch_id = int(request.POST["up_branch"]) | ||
| 164 | if "summary" in request.POST: | 162 | if "summary" in request.POST: |
| 165 | layer_version.layer.summary = request.POST["summary"] | 163 | layer_version.layer.summary = request.POST["summary"] |
| 166 | if "description" in request.POST: | 164 | if "description" in request.POST: |
| @@ -193,7 +191,7 @@ class XhrLayer(View): | |||
| 193 | layer_version = Layer_Version.objects.get( | 191 | layer_version = Layer_Version.objects.get( |
| 194 | id=kwargs['layerversion_id'], | 192 | id=kwargs['layerversion_id'], |
| 195 | project=kwargs['pid'], | 193 | project=kwargs['pid'], |
| 196 | layer_source__sourcetype=LayerSource.TYPE_IMPORTED) | 194 | layer_source=LayerSource.TYPE_IMPORTED) |
| 197 | except Layer_Version.DoesNotExist: | 195 | except Layer_Version.DoesNotExist: |
| 198 | return error_response("Cannot find imported layer to delete") | 196 | return error_response("Cannot find imported layer to delete") |
| 199 | 197 | ||
