diff --git a/app/uk/gov/hmrc/thirdpartyapplication/services/AuditService.scala b/app/uk/gov/hmrc/thirdpartyapplication/services/AuditService.scala index 00d8cacc3..04447d2a0 100644 --- a/app/uk/gov/hmrc/thirdpartyapplication/services/AuditService.scala +++ b/app/uk/gov/hmrc/thirdpartyapplication/services/AuditService.scala @@ -426,7 +426,7 @@ object AuditHelper { "applicationId" -> app.id.value.toString, "applicationName" -> app.name, "upliftRequestedByEmail" -> app.state.requestedByEmailAddress.getOrElse("-"), - "applicationAdmins" -> app.admins.map(_.emailAddress).mkString(", ") + "applicationAdmins" -> app.admins.map(_.emailAddress.text).mkString(", ") ) def calculateAppChanges(previous: StoredApplication, updated: StoredApplication) = { diff --git a/test/uk/gov/hmrc/thirdpartyapplication/services/AuditServiceSpec.scala b/test/uk/gov/hmrc/thirdpartyapplication/services/AuditServiceSpec.scala index 36d41d0aa..30581f643 100644 --- a/test/uk/gov/hmrc/thirdpartyapplication/services/AuditServiceSpec.scala +++ b/test/uk/gov/hmrc/thirdpartyapplication/services/AuditServiceSpec.scala @@ -200,7 +200,7 @@ class AuditServiceSpec extends AsyncHmrcSpec with ApplicationStateUtil "applicationId" -> appInTesting.id.value.toString, "applicationName" -> appInTesting.name, "upliftRequestedByEmail" -> appInTesting.state.requestedByEmailAddress.getOrElse("-"), - "applicationAdmins" -> appInTesting.admins.map(_.emailAddress).mkString(", ") + "applicationAdmins" -> appInTesting.admins.map(_.emailAddress.text).mkString(", ") ) val extraDetail = questionsWithAnswers ++ declinedData ++ dates ++ counters ++ gatekeeperDetails