From 30089eae721daa993500292f9bcee3ac6bf90e2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Kleinekath=C3=B6fer?= Date: Wed, 10 Oct 2018 12:59:30 +0200 Subject: [PATCH] Fix like method to find pages correctly --- app/db/impl/schema/PageSchema.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/db/impl/schema/PageSchema.scala b/app/db/impl/schema/PageSchema.scala index 67bcbe3fd..88c6d6518 100644 --- a/app/db/impl/schema/PageSchema.scala +++ b/app/db/impl/schema/PageSchema.scala @@ -18,8 +18,9 @@ class PageSchema(override val service: ModelService) this.service.find[Page]( this.modelClass, p => - p.projectId === page.projectId && p.name.toLowerCase === page.name.toLowerCase - && page.parentId.isDefined && page.parentId.fold(true: Rep[Boolean])(p.parentId.get === _) + p.projectId === page.projectId && p.name.toLowerCase === page.name.toLowerCase && page.parentId.fold( + true: Rep[Boolean] + )(p.parentId.get === _) ) }