From 5b348858a0b854e847586a2751d5c917f2c4d48a Mon Sep 17 00:00:00 2001 From: Gaurav Talreja Date: Tue, 19 Nov 2024 14:35:55 +0530 Subject: [PATCH 1/2] Add boolean field for content_default_http_proxy in HTTProxy entity Signed-off-by: Gaurav Talreja --- nailgun/entities.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nailgun/entities.py b/nailgun/entities.py index 3512ab2d..d4bfa3e8 100644 --- a/nailgun/entities.py +++ b/nailgun/entities.py @@ -5534,6 +5534,7 @@ def __init__(self, server_config=None, **kwargs): 'organization': entity_fields.OneToManyField(Organization), 'location': entity_fields.OneToManyField(Location), 'cacert': entity_fields.StringField(), + 'content_default_http_proxy': entity_fields.BooleanField(), } self._meta = {'api_path': 'api/v2/http_proxies'} super().__init__(server_config=server_config, **kwargs) From d18e9837823692f4a56a982ce0824cf1b5b7df0c Mon Sep 17 00:00:00 2001 From: Gaurav Talreja Date: Thu, 13 Feb 2025 13:54:32 +0530 Subject: [PATCH 2/2] Ignore content_default_http_proxy param for SAT-30769 Signed-off-by: Gaurav Talreja --- nailgun/entities.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nailgun/entities.py b/nailgun/entities.py index d4bfa3e8..45688dfb 100644 --- a/nailgun/entities.py +++ b/nailgun/entities.py @@ -5557,12 +5557,17 @@ def read(self, entity=None, attrs=None, ignore=None, params=None): For more information, see `Bugzilla #1779642 `_. """ + if attrs is None: + attrs = self.read_json() if ignore is None: ignore = set() ignore.add('password') ignore.add('organization') ignore.add('location') ignore.add('cacert') + # Workaround for SAT-30769 + if 'content_default_http_proxy' not in attrs: + ignore.add('content_default_http_proxy') return super().read(entity, attrs, ignore, params)