From 238e2cb7528187d677143eff4d8d4132a472a4eb Mon Sep 17 00:00:00 2001 From: Jonas Natten Date: Tue, 26 Nov 2024 14:22:57 +0100 Subject: [PATCH] draft-api: Stop updating taxonomy metadata on publish --- .../no/ndla/draftapi/service/StateTransitionRules.scala | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/draft-api/src/main/scala/no/ndla/draftapi/service/StateTransitionRules.scala b/draft-api/src/main/scala/no/ndla/draftapi/service/StateTransitionRules.scala index 13a70a1fc..257bf9be7 100644 --- a/draft-api/src/main/scala/no/ndla/draftapi/service/StateTransitionRules.scala +++ b/draft-api/src/main/scala/no/ndla/draftapi/service/StateTransitionRules.scala @@ -95,11 +95,10 @@ trait StateTransitionRules { val h5pPaths = converterService.getEmbeddedH5PPaths(article) h5pApiClient.publishH5Ps(h5pPaths, user): Unit - val taxonomyT = taxonomyApiClient.updateTaxonomyIfExists(id, article, user) - val taxMetadataT = taxonomyApiClient.updateTaxonomyMetadataIfExists(id, visible = true, user) + val taxonomyT = taxonomyApiClient.updateTaxonomyIfExists(id, article, user) val articleUdpT = articleApiClient.updateArticle(id, article, externalIds, isImported, useSoftValidation, user) - val failures = Seq(taxonomyT, taxMetadataT, articleUdpT).collectFirst { case Failure(ex) => + val failures = Seq(taxonomyT, articleUdpT).collectFirst { case Failure(ex) => Failure(ex) } failures.getOrElse(articleUdpT)