Exemplo n.º 1
0
 def put(self, request: HttpRequest, id: str, dto: PlaceInDto):
     id = self.parse_int_pk(id)
     place = PlaceService.update(id, dto.name)
     return ApiResponse.success(PlaceOutDto.from_place(place))
Exemplo n.º 2
0
 def save(self, commit=True):
     place = PlaceService.update(id=self.cleaned_data[ID],
                                 name=self.cleaned_data[NAME])
     return place