Skip to content

Commit

Permalink
GFORMS-3026 - Update data retrieval to correct response from DES
Browse files Browse the repository at this point in the history
  • Loading branch information
DursunGundogan committed Nov 12, 2024
1 parent 2aacd61 commit e1ce12c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/uk/gov/hmrc/gform/eval/EvaluationResults.scala
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,14 @@ case class EvaluationResults(
dataRetrieveId
)
)
case d @ DataRetrieveCtx(_, DataRetrieve.Attribute("agencyAddress")) =>
evaluationContext.thirdPartyData.dataRetrieve.fold(ExpressionResult.empty) { dr =>
DataRetrieveEval.getDataRetrieveAttribute(dr, d) match {
case Some(h :: Nil) => AddressResult(List(h))
case Some(xs) => AddressResult(xs)
case None => Empty
}
}
case d @ DataRetrieveCtx(_, _) =>
val exprResult =
evaluationContext.thirdPartyData.dataRetrieve.fold(ExpressionResult.empty) { dr =>
Expand Down

0 comments on commit e1ce12c

Please sign in to comment.