Skip to content

Commit 3b8761e

Browse files
Michael BüßemeyerMichael Büßemeyer
authored andcommitted
apply feedback
1 parent 8ea5c3a commit 3b8761e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

app/models/annotation/nml/NmlParser.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,9 +381,7 @@ class NmlParser @Inject()(datasetDAO: DatasetDAO) extends LazyLogging with Proto
381381
nodes.headOption.map(node => getSingleAttribute(node, "wkUrl"))
382382

383383
private def parseOrganizationId(nodes: NodeSeq, fallbackOrganization: String): String =
384-
nodes.headOption
385-
.map(node => getSingleAttributeOpt(node, "organization").getOrElse(fallbackOrganization))
386-
.getOrElse(fallbackOrganization)
384+
nodes.headOption.flatMap(node => getSingleAttributeOpt(node, "organization")).getOrElse(fallbackOrganization)
387385

388386
private def parseActiveNode(nodes: NodeSeq): Option[Int] =
389387
nodes.headOption.flatMap(node => getSingleAttribute(node, "id").toIntOpt)

0 commit comments

Comments
 (0)