Make motherAndFatherNames nullable

This commit is contained in:
Mikołaj Pich 2021-02-26 10:38:02 +01:00
parent aa4e696346
commit 6cdcad40fd
2 changed files with 2 additions and 2 deletions

View file

@ -80,5 +80,5 @@ data class StudentInfo(
val isPole: Boolean,
@Json(name = "ImieMatkiIOjca")
val motherAndFatherNames: String
val motherAndFatherNames: String?
)

View file

@ -18,7 +18,7 @@ fun ScrapperStudentInfo.mapStudent() = StudentInfo(
familyName = familyName.orEmpty(),
firstName = name,
gender = if (gender) StudentGender.MALE else StudentGender.FEMALE,
parentsNames = motherAndFatherNames,
parentsNames = motherAndFatherNames.orEmpty(),
phoneNumber = homePhone.orEmpty(),
hasPolishCitizenship = polishCitizenship == 1,
registeredAddress = registeredAddress,