onurtashan commented on code in PR #40193:
URL: https://github.com/apache/superset/pull/40193#discussion_r3255450389
##########
superset-frontend/src/dashboard/actions/dashboardState.ts:
##########
@@ -468,9 +468,8 @@ export function saveDashboardRequest(
);
const cleanedData: JsonObject = {
...data,
- certified_by: certified_by || '',
- certification_details:
- certified_by && certification_details ? certification_details : '',
+ ...(certified_by !== undefined && { certified_by }),
+ ...(certification_details !== undefined && { certification_details }),
Review Comment:
Good catch. You're right — `certification_details` was being spread
independently, so clearing `certified_by` left stale details in place.
Fixed in the latest commit by gating both fields together:
- `certified_by` is `undefined` → neither field is sent (existing
certification preserved)
- `certified_by` is `''` (user removing certification) → both are cleared
- `certified_by` has a value → both are sent normally
--
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]