summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/api.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/toastergui/api.py')
-rw-r--r--bitbake/lib/toaster/toastergui/api.py6
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