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 2020/10/21 20:23:18 UTC

[GitHub] [incubator-superset] villebro commented on a change in pull request #11369: bugfix: dashboard cache invalid join query

villebro commented on a change in pull request #11369:
URL: https://github.com/apache/incubator-superset/pull/11369#discussion_r509663755



##########
File path: superset/models/dashboard.py
##########
@@ -312,10 +312,10 @@ def clear_cache_for_datasource(cls, datasource_id: int) -> None:
             [dashboard_slices.c.dashboard_id], distinct=True,
         ).select_from(
             join(
-                Slice,
                 dashboard_slices,
-                Slice.id == dashboard_slices.c.slice_id,
-                Slice.datasource_id == datasource_id,
+                Slice,
+                (Slice.id == dashboard_slices.c.slice_id)
+                & (Slice.datasource_id == datasource_id),

Review comment:
       nit: I think this could be expressed as `and_(Slice.id == dashboard_slices.c.slice_id, Slice.datasource_id == datasource_id)`




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