From aec22508249ea419a38eadfdb065c8f0c9ac27ee Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Thu, 17 May 2018 12:57:43 -0500 Subject: [PATCH 1/2] Add `has_valid_clone` and `has_valid_webhook` to ProjectAdminSerializer This is needed to be able to update the `has_valid_clone` field from the UpdateDocsTask when a build is triggered but also it's good information to have over the API. --- readthedocs/restapi/serializers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/readthedocs/restapi/serializers.py b/readthedocs/restapi/serializers.py index b4d8b2b9b16..97f4335f17a 100644 --- a/readthedocs/restapi/serializers.py +++ b/readthedocs/restapi/serializers.py @@ -60,6 +60,8 @@ class Meta(ProjectSerializer.Meta): 'requirements_file', 'python_interpreter', 'features', + 'has_valid_clone', + 'has_valid_webhook', ) From d7b2fd10d116964efb90d07e5dc0bd2027a99612 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Thu, 24 May 2018 11:58:29 -0500 Subject: [PATCH 2/2] Fix test case to check new fields --- readthedocs/rtd_tests/tests/test_api.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/readthedocs/rtd_tests/tests/test_api.py b/readthedocs/rtd_tests/tests/test_api.py index 726ec8b06fc..743b25e90a9 100644 --- a/readthedocs/rtd_tests/tests/test_api.py +++ b/readthedocs/rtd_tests/tests/test_api.py @@ -735,6 +735,8 @@ def test_get_version_by_id(self): 'enable_epub_build': True, 'enable_pdf_build': True, 'features': ['allow_deprecated_webhooks'], + 'has_valid_clone': False, + 'has_valid_webhook': False, 'id': 6, 'install_project': False, 'language': 'en',