Skip to content

Commit

Permalink
Enable use of operators for query_object() object_type
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristjan committed Sep 25, 2023
1 parent bcab4f4 commit 933b69e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions OPDM/OPDM_SOAP_API.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ class Operations:
<sm:part name="name">{query_id}</sm:part>
<sm:part name="query" type="opde:MetaDataPattern">
<opdm:OPDMObject>
<pmd:Object-Type>{object_type}</pmd:Object-Type>
<opde:Components/>
<opde:Dependencies/>
</opdm:OPDMObject>
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 933b69e

Please sign in to comment.