From ce617bd8a376b13f8db6e1b1dc01e5923ad1d6aa Mon Sep 17 00:00:00 2001 From: Ryan Mitchell Date: Wed, 15 May 2024 19:02:18 +0100 Subject: [PATCH] Fix querying publish dates on undated entries --- src/Stache/Query/QueriesEntryStatus.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Stache/Query/QueriesEntryStatus.php b/src/Stache/Query/QueriesEntryStatus.php index e26b8f7d0a..b5a5d33eed 100644 --- a/src/Stache/Query/QueriesEntryStatus.php +++ b/src/Stache/Query/QueriesEntryStatus.php @@ -22,6 +22,7 @@ public function whereStatus(string $status) return $this->where(fn ($query) => $this ->getCollectionsForStatusQuery() + ->filter(fn ($collection) => $collection->dated()) ->each(fn ($collection) => $query->orWhere(fn ($q) => $this->addCollectionStatusLogicToQuery($q, $status, $collection)))); }