From 5eef2a7cb5368165f76e4a79cf7236472f5e6168 Mon Sep 17 00:00:00 2001 From: Thibault Duplessis Date: Fri, 21 Aug 2020 12:28:05 +0200 Subject: [PATCH] fix account URL shortcut for usernames with 12 chars --- app/controllers/Round.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/Round.scala b/app/controllers/Round.scala index d4bdc7efe3..0db9c57498 100644 --- a/app/controllers/Round.scala +++ b/app/controllers/Round.scala @@ -79,8 +79,9 @@ final class Round( def player(fullId: String) = Open { implicit ctx => - OptionFuResult(env.round.proxyRepo.pov(fullId)) { pov => - renderPlayer(pov) + env.round.proxyRepo.pov(fullId) flatMap { + case Some(pov) => renderPlayer(pov) + case None => userC.tryRedirect(fullId) getOrElse notFound } }