From b056e99be87bb3a9344ce2d32e5be1beed04aa34 Mon Sep 17 00:00:00 2001 From: To-om Date: Tue, 2 Mar 2021 13:26:09 +0100 Subject: [PATCH] #1670 Fix circular dependency in tag/taxonomy --- thehive/app/org/thp/thehive/services/TagSrv.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/thehive/app/org/thp/thehive/services/TagSrv.scala b/thehive/app/org/thp/thehive/services/TagSrv.scala index 81a7f3fcd9..efdf43ce44 100644 --- a/thehive/app/org/thp/thehive/services/TagSrv.scala +++ b/thehive/app/org/thp/thehive/services/TagSrv.scala @@ -14,17 +14,18 @@ import org.thp.thehive.models._ import org.thp.thehive.services.OrganisationOps._ import org.thp.thehive.services.TagOps._ -import javax.inject.{Inject, Named, Singleton} +import javax.inject.{Inject, Named, Provider, Singleton} import scala.util.matching.Regex import scala.util.{Success, Try} @Singleton class TagSrv @Inject() ( organisationSrv: OrganisationSrv, - taxonomySrv: TaxonomySrv, + taxonomySrvProvider: Provider[TaxonomySrv], appConfig: ApplicationConfig, @Named("integrity-check-actor") integrityCheckActor: ActorRef ) extends VertexSrv[Tag] { + lazy val taxonomySrv: TaxonomySrv = taxonomySrvProvider.get val taxonomyTagSrv = new EdgeSrv[TaxonomyTag, Taxonomy, Tag] private val freeTagColourConfig: ConfigItem[String, String] =