Skip to content

Commit

Permalink
Fix typing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
robbie-c committed Oct 16, 2023
1 parent 5de1214 commit 30babc3
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
WebTopClicksQuery,
WebOverviewStatsQuery,
WebStatsTableQuery,
HogQLPropertyFilter,
)

WebQueryNode = Union[
Expand All @@ -38,10 +39,13 @@ def query_date_range(self):

@cached_property
def pathname_property_filter(self) -> Optional[EventPropertyFilter]:
return next((p for p in self.query.properties if p.key == "$pathname"), None)
return next(
(p for p in self.query.properties if isinstance(p, EventPropertyFilter) and p.type == p.key == "$pathname"),
None,
)

@cached_property
def property_filters_without_pathname(self) -> List[EventPropertyFilter]:
def property_filters_without_pathname(self) -> List[Union[EventPropertyFilter, HogQLPropertyFilter]]:
return [p for p in self.query.properties if p.key != "$pathname"]

def session_where(self):
Expand Down

0 comments on commit 30babc3

Please sign in to comment.