diff --git a/lib/Db/SignRequestMapper.php b/lib/Db/SignRequestMapper.php index a4e05952fa..e97cb45708 100644 --- a/lib/Db/SignRequestMapper.php +++ b/lib/Db/SignRequestMapper.php @@ -24,6 +24,7 @@ namespace OCA\Libresign\Db; +use Doctrine\DBAL\Platforms\PostgreSQLPlatform; use OCA\Libresign\Helper\Pagination; use OCA\Libresign\Service\IdentifyMethod\IIdentifyMethod; use OCA\Libresign\Service\IdentifyMethodService; @@ -464,6 +465,9 @@ private function getFilesAssociatedFilesWithMeQueryBuilder(string $userId, ?stri 'f.status', 'f.created_at', ); + if (!$qb->getConnection()->getDatabasePlatform() instanceof PostgreSQLPlatform) { + $qb->addGroupBy('f.metadata'); + } $or = [ $qb->expr()->eq('f.user_id', $qb->createNamedParameter($userId)),