# call this code from create method with a pk to update (if exists) self.kwargs["pk"] = str(query_set[0].pk) return self.update(request, *args, **kwargs)