Skip to content

Commit eadf6ac

Browse files
authored
Build: fix API call to version.patch() (#10175)
The attribute in the serializer isn't declared as allow_null=True, so the call to patch fails for projects that aren't using this new feature. This also fixes tests on .com.
1 parent 2d0dbcb commit eadf6ac

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

readthedocs/api/v2/serializers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class VersionAdminSerializer(VersionSerializer):
126126

127127
project = ProjectAdminSerializer()
128128
canonical_url = serializers.SerializerMethodField()
129-
build_data = serializers.JSONField(required=False, write_only=True)
129+
build_data = serializers.JSONField(required=False, write_only=True, allow_null=True)
130130

131131
def get_canonical_url(self, obj):
132132
return obj.project.get_docs_url(

readthedocs/proxito/tests/test_hosting.py

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
@override_settings(
1717
PUBLIC_DOMAIN="dev.readthedocs.io",
1818
PUBLIC_DOMAIN_USES_HTTPS=True,
19+
GLOBAL_ANALYTICS_CODE=None,
1920
)
2021
@pytest.mark.proxito
2122
class TestReadTheDocsConfigJson(TestCase):

0 commit comments

Comments
 (0)