Skip to content

Commit

Permalink
Merge pull request #1074 from ShouraySolanki/dial_image_fix
Browse files Browse the repository at this point in the history
Issue #KN-000 fix: Dial Image publish issue
  • Loading branch information
pallakartheekreddy authored May 30, 2024
2 parents 2272e93 + d015528 commit f6fb77d
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ object DIALManager {
"text" -> dialcode,
"id" -> fileName
)

val imageData = new util.HashMap[String, AnyRef]()
imageData.put("dialcode", dialcode)
imageData.put("config", mergedConfig.mapValues(_.toString).asJava)
Expand All @@ -370,15 +371,14 @@ object DIALManager {
imageContext.putAll(request.getContext)
imageReq.setContext(imageContext)
imageReq.getContext.put("schemaName", "dialcode_image")
imageReq.getContext.put("objectType", "content")
imageReq.getContext.put("objectType", request.getObjectType)
imageReq.putAll(imageData)

oec.dialgraphService.saveExternalProps(imageReq)
oec.graphService.saveExternalProps(imageReq)

dialData
}


val processId = UUID.randomUUID
val dialcodes = dialCodesMap.map(_("text")).toList.asJava
rspObj.getResult.put(DIALConstants.PROCESS_ID, processId)
Expand All @@ -399,13 +399,14 @@ object DIALManager {
context.remove("identifier")
updateReq.setContext(context)
updateReq.getContext.put("schemaName", "dialcode")
updateReq.getContext.put("objectType", "content")
updateReq.getContext.put("objectType", request.getObjectType)
val updateMap = new util.HashMap[String, AnyRef]()
updateMap.put("identifier", rspObj.get("node_id"))
updateMap.put("status",Int.box(0) )
updateReq.setRequest(updateMap)
updateReq.putAll(batch)


oec.dialgraphService.saveExternalProps(updateReq).map { resp =>
if (ResponseHandler.checkError(resp)) {
throw new ServerException("ERR_WHILE_SAVING_TO_CASSANDRA", "Error while saving external props to Cassandra")
Expand Down

0 comments on commit f6fb77d

Please sign in to comment.