Fix: the resource's parameter 'parentId' is resourcepool ID
[pti/o2.git] / o2ims / service / auditor / pserver_handler.py
index f5df381..d18d3c3 100644 (file)
@@ -97,7 +97,7 @@ def create_by(stxobj: StxGenericModel, parentid: str, resourcetype_id: str) \
     # content = json.loads(stxobj.content)
     resourcetype_id = resourcetype_id
     resourcepool_id = parentid
-    parent_id = parentid
+    parent_id = None  # the root of the resource has no parent id
     gAssetId = ''  # TODO: global ID
     description = "A physical server resource"
     resource = Resource(stxobj.id, resourcetype_id, resourcepool_id,