Skip to content

Commit

Permalink
trim staff names (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
anthony-britton-moj authored Aug 15, 2022
1 parent 1a89471 commit 5a969f3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ data class PrisonCaseNote(
) {
fun getStaffName(): StaffName =
if (authorName.contains(',')) {
StaffName(authorName.substringAfterLast(","), authorName.substringBeforeLast(","))
StaffName(authorName.substringAfterLast(",").trim(), authorName.substringBeforeLast(",").trim())
} else
StaffName(authorName.substringBeforeLast(" "), authorName.substringAfterLast(" "))
StaffName(authorName.substringBeforeLast(" ").trim(), authorName.substringAfterLast(" ").trim())
}

data class CaseNoteAmendment(
Expand Down

0 comments on commit 5a969f3

Please sign in to comment.