dpgaspar commented on a change in pull request #9435: [dashboards] New, tittle 
and slug OR filter
URL: 
https://github.com/apache/incubator-superset/pull/9435#discussion_r403974511
 
 

 ##########
 File path: superset/dashboards/filters.py
 ##########
 @@ -23,6 +24,19 @@
 from superset.views.base import BaseFilter, get_user_roles
 
 
+class DashboardTitleOrSlugFilter(BaseFilter):  # pylint: 
disable=too-few-public-methods
+    name = _("Title or Slug")
+    arg_name = "title_or_slug"
+
+    def apply(self, query, value):
+        return query.filter(
+            or_(
+                Dashboard.dashboard_title.ilike(value + "%"),
 
 Review comment:
   Good idea, changed it

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to