From d2afe93ff3467665f0658a59aaabc468c0adf627 Mon Sep 17 00:00:00 2001 From: Anselm Brehme Date: Sat, 24 Mar 2018 18:18:39 +0100 Subject: [PATCH] fix api deployment --- app/controllers/ApiController.scala | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/controllers/ApiController.scala b/app/controllers/ApiController.scala index 2308aea3f..19c1fcd1b 100644 --- a/app/controllers/ApiController.scala +++ b/app/controllers/ApiController.scala @@ -219,7 +219,14 @@ final class ApiController @Inject()(api: OreRestfulApi, } } - projectData.project.owner.user.flatMap(upload) + for { + user <- projectData.project.owner.user + orga <- user.toMaybeOrganization + owner <- orga.map(_.owner.user).getOrElse(Future.successful(user)) + result <- upload(owner) + } yield { + result + } } } dep.flatten