From da6869e88bc810bf48628635965eebf94ac7445d Mon Sep 17 00:00:00 2001 From: Loris Sauter Date: Thu, 11 Jul 2024 12:11:28 +0200 Subject: [PATCH] Fixed #475 --- backend/src/main/kotlin/dev/dres/mgmt/TemplateManager.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/kotlin/dev/dres/mgmt/TemplateManager.kt b/backend/src/main/kotlin/dev/dres/mgmt/TemplateManager.kt index fb0b877e..896edcd2 100644 --- a/backend/src/main/kotlin/dev/dres/mgmt/TemplateManager.kt +++ b/backend/src/main/kotlin/dev/dres/mgmt/TemplateManager.kt @@ -365,7 +365,7 @@ object TemplateManager { it.copy(id = null) }, teams = apiTemplate.teams.map { - it.copy(id = null, logoData = Base64.getEncoder().encodeToString(getTeamLogo(it.teamId)!!.readAllBytes())) + it.copy(id = null, logoData = if(getTeamLogo(it.teamId) != null) {Base64.getEncoder().encodeToString(getTeamLogo(it.teamId)?.readAllBytes())}else{null}) } )