From 5b8a62dad7d429034c52290385da570c5ca1da34 Mon Sep 17 00:00:00 2001 From: Michael Wood Date: Fri, 14 Nov 2014 18:12:20 +0000 Subject: bitbake: toaster: libtoaster: Add getProjectInfo utility function Add a utility function to return a specified project's info/config This re-uses the existing server code path for the project edit except that it allows any project id to be used as a parameter (Bitbake rev: af42ea5f006c5cf55a7c57a42904f412639d261f) Signed-off-by: Michael Wood Signed-off-by: Alexandru DAMIAN Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bitbake/lib/toaster/toastergui/views.py') diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index 1b4bb9ff69..9f214bb677 100755 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py @@ -2057,8 +2057,11 @@ if toastermain.settings.MANAGED: except Exception as e: return HttpResponse(jsonfilter({"error":str(e) + "\n" + traceback.format_exc()}), content_type = "application/json") + def xhr_projectinfo(request): + if request.POST.has_key("project_id") == False: + raise BadParameterException("invalid project id") - + return xhr_projectedit(request, request.POST['project_id']) def xhr_projectedit(request, pid): try: -- cgit v1.2.3-54-g00ecf