We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8fd1fe3 + 3994415 commit af4ef4fCopy full SHA for af4ef4f
readthedocs/api/v3/serializers.py
@@ -557,8 +557,11 @@ class Meta:
557
558
def __init__(self, *args, **kwargs):
559
# Initialize the instance with the parent Project to be used in the
560
- # serializer validation.
561
- 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
562
+ # default to ``None`` because we don't need it at that point.
563
+ self.parent_project = kwargs.pop('parent', None)
564
+
565
super().__init__(*args, **kwargs)
566
567
def validate_child(self, value):
0 commit comments