From 1a368d360c1c82d06b0e33a2cbab1e95f58431ec Mon Sep 17 00:00:00 2001 From: Reinhard Prechtl Date: Fri, 9 Jun 2017 18:14:17 +0200 Subject: [PATCH] Simplify DTO creation --- .../main/kotlin/de/rpr/mycity/domain/city/entity/CityEntity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/domain/src/main/kotlin/de/rpr/mycity/domain/city/entity/CityEntity.kt b/domain/src/main/kotlin/de/rpr/mycity/domain/city/entity/CityEntity.kt index dca234e..92462a5 100644 --- a/domain/src/main/kotlin/de/rpr/mycity/domain/city/entity/CityEntity.kt +++ b/domain/src/main/kotlin/de/rpr/mycity/domain/city/entity/CityEntity.kt @@ -57,7 +57,7 @@ internal data class CityEntity( id = defaultCity.id!!, name = dto.name ?: defaultCity.name, 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(), createdAt = defaultCity.createdAt)