Skip to content

Commit

Permalink
Issue #KN-439 fix: Fixed update scenario where response is return wit…
Browse files Browse the repository at this point in the history
…h metadata without reading it again.
  • Loading branch information
anilguptatarento committed Nov 30, 2022
1 parent d1d6a03 commit a5495e0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ class GraphService {
val metadata = CSPMetaUtil.updateRelativePath(node.getMetadata)
node.setMetadata(metadata)
}
NodeAsyncOperations.addNode(graphId, node)
NodeAsyncOperations.addNode(graphId, node).map(resNode => if(isrRelativePathEnabled) CSPMetaUtil.updateAbsolutePath(resNode) else resNode)
}

def upsertNode(graphId: String, node: Node, request: Request): Future[Node] = {
if(isrRelativePathEnabled) {
val metadata = CSPMetaUtil.updateRelativePath(node.getMetadata)
node.setMetadata(metadata)
}
NodeAsyncOperations.upsertNode(graphId, node, request)
NodeAsyncOperations.upsertNode(graphId, node, request).map(resNode => if(isrRelativePathEnabled) CSPMetaUtil.updateAbsolutePath(resNode) else resNode)
}

def upsertRootNode(graphId: String, request: Request): Future[Node] = {
NodeAsyncOperations.upsertRootNode(graphId, request)
NodeAsyncOperations.upsertRootNode(graphId, request).map(resNode => if(isrRelativePathEnabled) CSPMetaUtil.updateAbsolutePath(resNode) else resNode)
}

def getNodeByUniqueId(graphId: String, nodeId: String, getTags: Boolean, request: Request): Future[Node] = {
Expand Down

0 comments on commit a5495e0

Please sign in to comment.