john-bodley commented on a change in pull request #12619:
URL: https://github.com/apache/superset/pull/12619#discussion_r561145644
##########
File path:
superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopover.jsx
##########
@@ -125,7 +125,15 @@ export default class AdhocMetricEditPopover extends
React.Component {
label = metricLabel;
}
- const metric = savedMetric?.metric_name ? savedMetric : adhocMetric;
+ // if saved metric, generate a unique savedMetricId
+ const metric = savedMetric?.metric_name
+ ? {
+ ...savedMetric,
+ savedMetricId: `${Math.random()
Review comment:
This unique ID seems somewhat hard to grok. Why not use a UUID?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]