mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-26 17:34:41 +00:00
fixed looker and optional proj filters (#15289)
This commit is contained in:
parent
7f111c7ed8
commit
b78e43e8d7
@ -661,7 +661,7 @@ class LookerSource(DashboardServiceSource):
|
||||
],
|
||||
# Dashboards are created from the UI directly. They are not linked to a project
|
||||
# like LookML assets, but rather just organised in folders.
|
||||
project=self._get_dashboard_project(dashboard_details),
|
||||
project=self.get_project_name(dashboard_details),
|
||||
sourceUrl=f"{clean_uri(self.service_connection.hostPort)}/dashboards/{dashboard_details.id}",
|
||||
service=self.context.dashboard_service,
|
||||
owner=self.get_owner_ref(dashboard_details=dashboard_details),
|
||||
@ -669,8 +669,7 @@ class LookerSource(DashboardServiceSource):
|
||||
yield Either(right=dashboard_request)
|
||||
self.register_record(dashboard_request=dashboard_request)
|
||||
|
||||
@staticmethod
|
||||
def _get_dashboard_project(dashboard_details: LookerDashboard) -> Optional[str]:
|
||||
def get_project_name(self, dashboard_details: LookerDashboard) -> Optional[str]:
|
||||
"""
|
||||
Get dashboard project if the folder is informed
|
||||
"""
|
||||
|
@ -54,6 +54,10 @@ def _filter(filter_pattern: Optional[FilterPattern], name: str) -> bool:
|
||||
# No filter pattern, nothing to filter
|
||||
return False
|
||||
|
||||
if filter_pattern and not name:
|
||||
# Filter pattern is present but not the name so we'll filter it out
|
||||
return True
|
||||
|
||||
if filter_pattern.includes:
|
||||
validate_regex(filter_pattern.includes)
|
||||
return not any( # pylint: disable=use-a-generator
|
||||
|
Loading…
x
Reference in New Issue
Block a user