File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
app/models/annotation/nml Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -381,9 +381,7 @@ class NmlParser @Inject()(datasetDAO: DatasetDAO) extends LazyLogging with Proto
381
381
nodes.headOption.map(node => getSingleAttribute(node, " wkUrl" ))
382
382
383
383
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)
387
385
388
386
private def parseActiveNode (nodes : NodeSeq ): Option [Int ] =
389
387
nodes.headOption.flatMap(node => getSingleAttribute(node, " id" ).toIntOpt)
You can’t perform that action at this time.
0 commit comments