Skip to content

Commit

Permalink
MAN-28 - do not include lc notes if there are not any
Browse files Browse the repository at this point in the history
  • Loading branch information
achimber-moj committed Oct 17, 2024
1 parent f8f24a9 commit ad2edf2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ data class LicenceCondition(
val subTypeDescription: String? = null,
val imposedReleasedDate: LocalDate,
val actualStartDate: LocalDate? = null,
val notes: List<LicenceConditionNote> = listOf()
val notes: List<LicenceConditionNote>? = null
)

data class LicenceConditionNote(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class SentenceService(
populateLicenceConditionNotes(notes)
)

fun populateLicenceConditionNotes(notes: String?): List<LicenceConditionNote> {
fun populateLicenceConditionNotes(notes: String?): List<LicenceConditionNote>? {
val noteLength = 1500

notes?.let {
Expand Down Expand Up @@ -115,7 +115,8 @@ class SentenceService(
}

}
return listOf()

return null
}

fun ExtraSentence.toAdditionalSentence(): AdditionalSentence =
Expand Down

0 comments on commit ad2edf2

Please sign in to comment.