._.
This commit is contained in:
parent
e624bc4497
commit
337a7b1efd
@ -41,6 +41,7 @@ class CitiesService:
|
||||
city_model = City(
|
||||
name=entity.name,
|
||||
x_coordinate=entity.x_coordinate,
|
||||
y_coordinate=entity.y_coordinate,
|
||||
federal_district_id=entity.federal_district_id,
|
||||
)
|
||||
created_city = self.repository.create(city_model)
|
||||
@ -57,6 +58,8 @@ class CitiesService:
|
||||
if city_model:
|
||||
city_model.name = entity.name
|
||||
city_model.federal_district_id = entity.federal_district_id
|
||||
city_model.x_coordinate = entity.x_coordinate
|
||||
city_model.y_coordinate = entity.y_coordinate
|
||||
self.repository.update(city_model)
|
||||
return CityEntity(
|
||||
id=city_model.id,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user