diff --git a/readthedocs/api/v3/serializers.py b/readthedocs/api/v3/serializers.py index 992de2cbace..1883327a441 100644 --- a/readthedocs/api/v3/serializers.py +++ b/readthedocs/api/v3/serializers.py @@ -557,8 +557,11 @@ class Meta: def __init__(self, *args, **kwargs): # Initialize the instance with the parent Project to be used in the - # serializer validation. - self.parent_project = kwargs.pop('parent') + # serializer validation. When this Serializer is rendered as a Form in + # BrowsableAPIRenderer, it's not initialized with the ``parent``, so we + # default to ``None`` because we don't need it at that point. + self.parent_project = kwargs.pop('parent', None) + super().__init__(*args, **kwargs) def validate_child(self, value):