US579 commented on code in PR #30888:
URL: https://github.com/apache/superset/pull/30888#discussion_r1906990977


##########
superset/dashboards/api.py:
##########
@@ -479,7 +480,10 @@ def get_tabs(self, id_or_slug: str) -> Response:
         try:
             tabs = DashboardDAO.get_tabs_for_dashboard(id_or_slug)
             result = self.tab_schema.dump(tabs)
-            return self.response(200, result=result)
+            response_data = json.dumps({"result": result})
+            return Response(
+                response_data, status=HTTPStatus.OK, 
mimetype="application/json"
+            )

Review Comment:
   yep it does has mimetype, but jsonify func will reorder the dict, and it is 
part of the func in `self.response`
   
   This is a test example
   
   <img width="603" alt="Screenshot 2025-01-08 at 9 49 44 pm" 
src="https://github.com/user-attachments/assets/29733d15-abbe-457b-8d07-e6b31d6cea06";
 />
   
   
   <img width="540" alt="Screenshot 2025-01-08 at 9 48 59 pm" 
src="https://github.com/user-attachments/assets/e4f652d0-b644-431b-8bda-c16b74f1b3b7";
 />
   
   
   with response
   
   <img width="525" alt="Screenshot 2025-01-09 at 9 35 42 am" 
src="https://github.com/user-attachments/assets/70658e3b-4cab-49e2-905d-f48be813f42a";
 />
   
   
   <img width="670" alt="Screenshot 2025-01-09 at 9 35 32 am" 
src="https://github.com/user-attachments/assets/69ec04a2-8502-4861-8da5-f11e34210598";
 />
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to