From a12dd7d3429e85b2cffce8d6818d523a5a86cd05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Thu, 15 Feb 2024 10:41:00 +0100 Subject: [PATCH] fix: Only skip failing table data loading instead of full failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/Db/Row2Mapper.php | 3 +++ lib/Service/TableService.php | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Db/Row2Mapper.php b/lib/Db/Row2Mapper.php index 474e0c0d6..fc4c7fb6d 100644 --- a/lib/Db/Row2Mapper.php +++ b/lib/Db/Row2Mapper.php @@ -271,6 +271,9 @@ private function getFilter(IQueryBuilder &$qb, array $filterGroup): array { $filterExpressions = []; foreach ($filterGroup as $filter) { $columnId = $filter['columnId']; + if (!isset($this->columns[$columnId]) && !isset($this->allColumns[$columnId])) { + throw new InternalError('No column found to build filter with for id ' . $columnId); + } $column = $this->columns[$columnId] ?? $this->allColumns[$columnId]; // if is normal column diff --git a/lib/Service/TableService.php b/lib/Service/TableService.php index 6ea9096ca..988462a7a 100644 --- a/lib/Service/TableService.php +++ b/lib/Service/TableService.php @@ -124,7 +124,6 @@ public function findAll(?string $userId = null, bool $skipTableEnhancement = fal $this->enhanceTable($table, $userId); } catch (InternalError|PermissionError $e) { $this->logger->error($e->getMessage(), ['exception' => $e]); - throw new InternalError(get_class($this) . ' - ' . __FUNCTION__ . ': '.$e->getMessage()); } // if the table is shared with me, there are no other shares // will avoid showing the shared icon in the FE nav