msyavuz opened a new pull request, #41624:
URL: https://github.com/apache/superset/pull/41624

   ### SUMMARY
   
   SQL Lab let users save a query or dataset with an empty/whitespace-only 
name. The nameless entry then appeared in **Saved Queries** with a blank, 
non-clickable Name cell, so it couldn't be opened or managed.
   
   Fix, both layers:
   - **Backend** (`saved_queries`): reject a blank/whitespace-only `label` on 
add & edit, and strip surrounding whitespace before persisting.
   - **Frontend**: disable the Save/Update action in the **Save Query** modal 
and the **Save Dataset** modal until a non-whitespace name is entered.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   _To add._ Before: Save enabled with an empty Name → nameless row in Saved 
Queries. After: Save disabled until a real name is typed; API returns 400 for a 
blank `label`.
   
   ### TESTING INSTRUCTIONS
   
   1. SQL Lab → run a query → **Save → Save query**, clear the Name → Save 
button is disabled.
   2. Same for **Save dataset** (a whitespace-only name keeps Save disabled).
   3. API: `POST /api/v1/saved_query/` with `"label": " "` returns 400.
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [ ] Required feature flags: None
   - [x] Changes UI — Save/Update buttons in the two SQL Lab save modals
   - [ ] Includes DB Migration: No
   - [ ] Introduces new feature or API: No
   - [ ] Removes existing feature or API: No


-- 
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