diff --git a/lib/Db/FaceDetectionMapper.php b/lib/Db/FaceDetectionMapper.php index 2f7ff83f..3a8da900 100644 --- a/lib/Db/FaceDetectionMapper.php +++ b/lib/Db/FaceDetectionMapper.php @@ -275,6 +275,7 @@ public function findDetectionForPreviewImageByClusterId(int $clusterId) : FaceDe try { return $this->findEntity($qb); } catch (DoesNotExistException $e) { + $qb = $this->db->getQueryBuilder(); $qb->select(array_map(fn ($col) => 'd.'.$col, FaceDetection::$columns)) ->from('recognize_face_detections', 'd') ->where($qb->expr()->eq('d.cluster_id', $qb->createPositionalParameter($clusterId)))