From 2e06d213c02e51204ad73cade9ab8dd178376f40 Mon Sep 17 00:00:00 2001 From: catch <catch@35733.no-reply.drupal.org> Date: Thu, 21 Dec 2023 10:26:09 +0000 Subject: [PATCH] Issue #3395626 by amateescu: Fix workspace-support check in entity queries --- core/modules/workspaces/src/EntityQuery/QueryTrait.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/workspaces/src/EntityQuery/QueryTrait.php b/core/modules/workspaces/src/EntityQuery/QueryTrait.php index 336b656c7305..2630d9e9ee82 100644 --- a/core/modules/workspaces/src/EntityQuery/QueryTrait.php +++ b/core/modules/workspaces/src/EntityQuery/QueryTrait.php @@ -54,7 +54,7 @@ public function prepare() { // Only alter the query if the active workspace is not the default one and // the entity type is supported. - if ($this->workspaceManager->hasActiveWorkspace() && $this->workspaceManager->isEntityTypeSupported($this->entityType)) { + if ($this->workspaceManager->isEntityTypeSupported($this->entityType) && $this->workspaceManager->hasActiveWorkspace()) { $active_workspace = $this->workspaceManager->getActiveWorkspace(); $this->sqlQuery->addMetaData('active_workspace_id', $active_workspace->id()); $this->sqlQuery->addMetaData('simple_query', FALSE); -- GitLab