Sentry Issue: [POSTHOG-355](https://sentry.io/organizations/posthog/issues/2486864883/?referrer=github_integration)

```
Cohort.DoesNotExist: Cohort matching query does not exist.
(4 additional frame(s) were not displayed)
...
  File "ee/clickhouse/queries/sessions/list.py", line 155, in format_action_filters
    condition_sql, filter_params = format_action_filter_aggregate(entity, prepend=f"event_matcher_{index}")
  File "ee/clickhouse/queries/sessions/list.py", line 176, in format_action_filter_aggregate
    filters, filter_params = parse_prop_clauses(entity.properties, prepend=prepend, team_id=None)
  File "ee/clickhouse/models/property.py", line 41, in parse_prop_clauses
    cohort = Cohort.objects.get(pk=prop.value, team_id=team_id)
  File "django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "django/db/models/query.py", line 429, in get
    raise self.model.DoesNotExist(
```
posthog/api/test/test_event.py
person_factory(team=self.team, distinct_ids=["1"])
            for idx in range(0, 150):
                event_factory(
                    team=self.team,
                    event="some event",
                    distinct_id="1",
                    timestamp=timezone.now() - relativedelta(months=11) + relativedelta(days=idx, seconds=idx),
                )
            response = self.client.get("/api/event/?distinct_id=1").json()
            self.assertEqual(len(response["results"]), 100)
            self.assertIn("http://testserver/api/event/?distinct_id=1&before=", response["next"])
            page2 = self.client.get(response["next"]).json()
            from posthog.ee import is_clickhouse_enabled
            if is_clickhouse_enabled():
                from ee.clickhouse.client import sync_execute
                self.assertEqual(sync_execute("select count(*) from events")[0][0], 150)
            self.assertEqual(len(page2["results"]), 50)
        def test_action_no_steps(self):
            action = Action.objects.create(team=self.team)
            action.calculate_events()
            response = self.client.get("/api/event/?action_id=%s" % action.pk)
            self.assertEqual(response.status_code, 200)
            self.assertEqual(len(response.json()["results"]), 0)
        def test_get_single_action(self):