From 8fb86b2adbdf4fae63faabc8937728c43c1777d5 Mon Sep 17 00:00:00 2001 From: Hemanth Nakkina Date: Wed, 11 Dec 2019 10:09:22 +0530 Subject: [PATCH] GUI hangs on creation of project in User creation form On creation of project in user creation form, the response is sent as html and the javascript try to parse the output as json and fails. The project creation response should be sent as text/plain so that javascript can parse the string as json. The bug have 3 parts 1. Users are not listed on GUI in different domain 2. Projects are not listed on GUI in different domain 3. Gui hangs during creation of user/project using + option Case 1 & 2 are fixed at https://review.opendev.org/#/c/697962/ This patch fixes case 3. Change-Id: I4936a158ad99cf9d7514e79c06ed2315ce11218b Closes-Bug: #1826114 --- horizon/workflows/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/horizon/workflows/views.py b/horizon/workflows/views.py index 0ce15a8f10..89ed1c0445 100644 --- a/horizon/workflows/views.py +++ b/horizon/workflows/views.py @@ -208,7 +208,7 @@ class WorkflowView(hz_views.ModalBackdropMixin, generic.TemplateView): messages.error(request, msg) if "HTTP_X_HORIZON_ADD_TO_FIELD" in self.request.META: field_id = self.request.META["HTTP_X_HORIZON_ADD_TO_FIELD"] - response = http.HttpResponse() + response = http.HttpResponse(content_type="text/plain") if workflow.object: data = [self.get_object_id(workflow.object), self.get_object_display(workflow.object)]