You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "villebro (via GitHub)" <gi...@apache.org> on 2023/02/10 06:57:18 UTC

[GitHub] [superset] villebro commented on a diff in pull request #23016: fix(embedded): successfully load embedded dashboard as expected

villebro commented on code in PR #23016:
URL: https://github.com/apache/superset/pull/23016#discussion_r1102347481


##########
superset/connectors/sqla/models.py:
##########
@@ -1106,20 +1106,22 @@ def get_sqla_row_level_filters(
         filter_groups: Dict[Union[int, str], List[TextClause]] = defaultdict(list)
         try:
             for filter_ in security_manager.get_rls_filters(self):
-                clause = self.text(
-                    f"({template_processor.process_template(filter_.clause)})"
-                )
-                if filter_.group_key:
-                    filter_groups[filter_.group_key].append(clause)
-                else:
-                    all_filters.append(clause)
+                if filter_.clause:
+                    clause = self.text(
+                        f"({template_processor.process_template(filter_.clause)})"
+                    )
+                    if filter_.group_key:
+                        filter_groups[filter_.group_key].append(clause)
+                    else:
+                        all_filters.append(clause)

Review Comment:
   Looking at `SupersetSecurityManager.get_rls_filters(self)`, it states it should be returning `List[SqlaQuery]`. However, it appears to be returning `List[RowLevelSecurityFilter]`. So I believe that should also be fixed.



-- 
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: notifications-unsubscribe@superset.apache.org

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