From 933b69e6dcb8c2998f97992ed6a8812ae1ccd8a5 Mon Sep 17 00:00:00 2001 From: Kristjan Date: Mon, 25 Sep 2023 09:54:25 +0300 Subject: [PATCH] Enable use of operators for query_object() object_type --- OPDM/OPDM_SOAP_API.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OPDM/OPDM_SOAP_API.py b/OPDM/OPDM_SOAP_API.py index a24de8c..fec0339 100644 --- a/OPDM/OPDM_SOAP_API.py +++ b/OPDM/OPDM_SOAP_API.py @@ -118,7 +118,6 @@ class Operations: {query_id} - {object_type} @@ -240,7 +239,9 @@ def query_object(self, object_type="IGM", metadata_dict=None, components=None, d query_id = "pyquery_{api_version}_{uuid}".format(uuid=uuid.uuid4(), api_version=self.API_VERSION) - _QueryObject = self.Operations.QueryObject.format(query_id=query_id, object_type=object_type).encode() + _QueryObject = self.Operations.QueryObject.format(query_id=query_id).encode() + + _QueryObject = add_xml_elements(_QueryObject, ".//opdm:OPDMObject", {"pmd:Object-Type": object_type}) if metadata_dict: _QueryObject = add_xml_elements(_QueryObject, ".//opdm:OPDMObject", metadata_dict)