Skip to content

Commit a2cc184

Browse files
committed
Fixed runtime bug with space page.
1 parent 63ffa51 commit a2cc184

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

app/controllers/Spaces.scala

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,12 @@ class Spaces @Inject() (spaces: SpaceService, users: UserService, events: EventS
193193
val userSelections: List[String] =
194194
if (user.isDefined) selections.get(user.get.identityId.userId).map(_.id.stringify)
195195
else List.empty[String]
196-
Logger.debug("User selection " + userSelections)
196+
Logger.debug(s"User $user selections: $userSelections")
197197

198-
val rs = play.api.Play.current.configuration.getBoolean("stagingArea") match {
199-
case Some(plugin) => Publications.getPublications(s.id.toString, spaces)
200-
case None => List.empty
198+
val rs = if (play.api.Play.current.configuration.getBoolean("stagingArea").getOrElse(false)) {
199+
Publications.getPublications(s.id.toString, spaces)
200+
} else {
201+
List.empty
201202
}
202203
Ok(views.html.spaces.space(Utils.decodeSpaceElements(s), collectionsInSpace, publicDatasetsInSpace, datasetsInSpace, rs, play.Play.application().configuration().getString("SEADservices.uri"), userRoleMap, userSelections))
203204
}

0 commit comments

Comments
 (0)