You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/02/26 19:29:46 UTC

[GitHub] [superset] ktmud commented on a change in pull request #13331: fix(query-object): extra time-range-endpoints

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



##########
File path: superset/common/query_object.py
##########
@@ -181,8 +181,10 @@ def __init__(
         self.order_desc = order_desc
         self.extras = extras
 
-        if config["SIP_15_ENABLED"] and "time_range_endpoints" not in self.extras:
-            self.extras["time_range_endpoints"] = get_time_range_endpoints(form_data={})
+        if config["SIP_15_ENABLED"]:
+            self.extras["time_range_endpoints"] = get_time_range_endpoints(
+                form_data=self.extras
+            )

Review comment:
       I think there is a test case: https://github.com/apache/superset/blob/0a00153375fb69891c2a9f0115a33cdf5551b2d6/tests/query_context_tests.py#L170-L185
   
   that captures the intention of the original code.
   
   Do you mind adding a test case so your change is also tested?
   




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org