Пример #1
0
 def put(self, request: HttpRequest, id: str, dto: PersonInDto):
     id = self.parse_int_pk(id)
     person = PersonService.update(id, dto.name)
     return ApiResponse.success(PersonOutDto.from_person(person))
Пример #2
0
 def save(self, commit=True):
     person = PersonService.update(id=self.cleaned_data[ID],
                                   name=self.cleaned_data[NAME])
     return person