ktmud commented on a change in pull request #13434:
URL: https://github.com/apache/superset/pull/13434#discussion_r595488275



##########
File path: superset/common/query_object.py
##########
@@ -236,7 +237,7 @@ def __init__(
     @property
     def metric_names(self) -> List[str]:
         """Return metrics names (labels), coerce adhoc metrics to strings."""
-        return get_metric_names(self.metrics)
+        return get_metric_names(self.metrics or [])

Review comment:
       I'd rather keep the prevalence of `None` minimum. `metric_names` is just 
a shortcut for presentational information so it should be OK to be less strict.




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

Reply via email to