From 6495d12012ebfafa58e1d767bc0aa81b22a99709 Mon Sep 17 00:00:00 2001 From: Ralf Grubenmann Date: Mon, 14 Oct 2024 09:47:02 +0200 Subject: [PATCH] fix: fix merging of GroupAdded event into existing group partial --- .../io/renku/search/provision/handler/DocumentMerger.scala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/search-provision/src/main/scala/io/renku/search/provision/handler/DocumentMerger.scala b/modules/search-provision/src/main/scala/io/renku/search/provision/handler/DocumentMerger.scala index 8a3be404..637e3fac 100644 --- a/modules/search-provision/src/main/scala/io/renku/search/provision/handler/DocumentMerger.scala +++ b/modules/search-provision/src/main/scala/io/renku/search/provision/handler/DocumentMerger.scala @@ -117,6 +117,8 @@ object DocumentMerger: given DocumentMerger[GroupAdded] = instance[GroupAdded](_.toModel(DocVersion.NotExists).some) { + case (ga, p: PartialEntityDocument.Group) => + p.applyTo(ga.toModel(p.version)).some case (ga, u: GroupDocument) => ga.toModel(u.version).some case _ => None