[Answered ]-How do you perform get_or_create on DRF ModelViewSet when over riding create()?

1👍

You have to override the create method on the serializer, something like this:

class accessTokenSerializer(serializer.X):

    def create(self, validated_data):
        return YourModel.objects.get_or_create(name=validated_data.pop("name"), defaults=validated_data)[0]

Leave a comment