Simplify DTO creation
This commit is contained in:
parent
7fc151f1bf
commit
1a368d360c
1 changed files with 1 additions and 1 deletions
|
@ -57,7 +57,7 @@ internal data class CityEntity(
|
||||||
id = defaultCity.id!!,
|
id = defaultCity.id!!,
|
||||||
name = dto.name ?: defaultCity.name,
|
name = dto.name ?: defaultCity.name,
|
||||||
description = dto.description ?: defaultCity.description,
|
description = dto.description ?: defaultCity.description,
|
||||||
location = if (dto.location != null) Coordinate(dto.location.longitude, dto.location.latitude) else defaultCity.location,
|
location = if (dto.location != null) Coordinate.fromDto(dto.location) else defaultCity.location,
|
||||||
updatedAt = LocalDateTime.now(),
|
updatedAt = LocalDateTime.now(),
|
||||||
createdAt = defaultCity.createdAt)
|
createdAt = defaultCity.createdAt)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue