aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichal Jagiello <michal.jagiello@t-mobile.pl>2023-10-27 11:38:02 +0200
committerMichal Jagiello <michal.jagiello@t-mobile.pl>2023-10-27 11:39:31 +0200
commit113f63efae7d326a2896806caaecee1d1e69768d (patch)
tree37b0b32a104fd62e0b9d33b9156f5fc934a52e04 /src
parentee44099b708e456d24d8b34afa9a0ee2d97507b8 (diff)
Fix regression on patching any objects other than AAI resources
Due to fact that for patching some specific headers was set (due to fact A&AI requires that) all other resources couldn't be patched. That's a quick fix for that issue Issue-ID: TEST-404 Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl> Change-Id: I79d70d5bb6541db1c8b1b10db2d9091e16211846
Diffstat (limited to 'src')
-rw-r--r--src/onapsdk/aai/aai_element.py5
-rw-r--r--src/onapsdk/onap_service.py5
-rw-r--r--src/onapsdk/version.py2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/onapsdk/aai/aai_element.py b/src/onapsdk/aai/aai_element.py
index 69b2c71..2bfb565 100644
--- a/src/onapsdk/aai/aai_element.py
+++ b/src/onapsdk/aai/aai_element.py
@@ -99,7 +99,10 @@ class AaiElement(OnapService):
base_url = settings.AAI_URL
api_version = "/aai/" + settings.AAI_API_VERSION
headers = headers_aai_creator(OnapService.headers)
- patch_headers = headers_aai_creator(OnapService.patch_headers)
+ patch_headers = headers_aai_creator({
+ "Content-Type": "application/merge-patch+json",
+ "Accept": "application/json",
+ })
@classmethod
def get_guis(cls) -> GuiItem:
diff --git a/src/onapsdk/onap_service.py b/src/onapsdk/onap_service.py
index a054529..7b1dc17 100644
--- a/src/onapsdk/onap_service.py
+++ b/src/onapsdk/onap_service.py
@@ -79,10 +79,7 @@ class OnapService(ABC):
"Content-Type": "application/json",
"Accept": "application/json",
}
- patch_headers: Dict[str, str] = {
- "Content-Type": "application/merge-patch+json",
- "Accept": "application/json",
- }
+ patch_headers: Dict[str, str] = headers.copy()
proxy: Dict[str, str] = None
permanent_headers: PermanentHeadersCollection = PermanentHeadersCollection()
diff --git a/src/onapsdk/version.py b/src/onapsdk/version.py
index 5ec9ea1..3035ac5 100644
--- a/src/onapsdk/version.py
+++ b/src/onapsdk/version.py
@@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "12.6.0"
+__version__ = "12.6.1"