Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
knowledge-platform
Commits
d77e55d1
Commit
d77e55d1
authored
2 years ago
by
Jayaprakash n
Browse files
Options
Download
Patches
Plain Diff
Issue #KN-547 debug: Collection hierarchy dialcodes coming as string
parent
ff18bd34
release-5.3.0
AmiableAnil-patch-1
Gcloud_copy
Gcloud_fix
Remove_unwantedCode_Gcloud_fix
bulk-upload-comptenecy-mapping
bulk-upload-excelsheet
bulk-upload-test_excel
bulk_upload
csp-migration
knowlg-oneclick
local-setup-kube
master
patch-1
patch-2
patch-3
poc_bulk_upload
rahul_bulk_upload_postgres
release-5.1.0
release-5.1.0-content
release-5.2.0
release-5.2.0_RC2
release-5.2.0_RC1
release-5.1.0_RC1
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
content-api/content-actors/src/main/scala/org/sunbird/content/dial/DIALManager.scala
+4
-5
...src/main/scala/org/sunbird/content/dial/DIALManager.scala
with
4 additions
and
5 deletions
+4
-5
content-api/content-actors/src/main/scala/org/sunbird/content/dial/DIALManager.scala
+
4
−
5
View file @
d77e55d1
...
...
@@ -356,14 +356,13 @@ object DIALManager {
HierarchyManager
.
getHierarchy
(
request
).
flatMap
(
getImageHierarchyResponse
=>
{
val
imageCollectionHierarchy
=
getImageHierarchyResponse
.
getResult
.
getOrDefault
(
ContentConstants
.
CONTENT
,
new
java
.
util
.
HashMap
[
String
,
AnyRef
]()).
asInstanceOf
[
java.util.Map
[
String
,
AnyRef
]]
TelemetryManager
.
info
(
"DIALManager:: populateAssignedDialCodes:: imageCollectionHierarchy:: "
+
imageCollectionHierarchy
)
val
imageChildrenHierarchy
=
imageCollectionHierarchy
.
get
(
ContentConstants
.
CHILDREN
).
asInstanceOf
[
util.List
[
util.Map
[
String
,
AnyRef
]]].
asScala
.
toList
val
imageChildrenAssignedDIALList
=
getAssignedDIALcodes
(
imageChildrenHierarchy
)
val
contentImageAssignedDIALList
=
if
(
imageCollectionHierarchy
.
containsKey
(
DIALConstants
.
DIALCODES
)
&&
imageCollectionHierarchy
.
get
(
DIALConstants
.
DIALCODES
)
!=
null
)
{
TelemetryManager
.
info
(
"DIALManager:: populateAssignedDialCodes:: collection DIAL codes:: "
+
imageCollectionHierarchy
.
get
(
DIALConstants
.
DIALCODES
).
toString
)
val
hierarchyDialCode
:
List
[
String
]
=
imageCollectionHierarchy
.
get
(
DIALConstants
.
DIALCODES
)
match
{
case
strVal
:
String
=>
ScalaJsonUtils
.
deserialize
(
strVal
).
asInstanceOf
[
List
[
String
]]
case
anyVal
=>
anyVal
.
asInstanceOf
[
List
[
String
]]
}
TelemetryManager
.
info
(
"DIALManager:: populateAssignedDialCodes:: collection DIAL codes:: "
+
imageCollectionHierarchy
.
get
(
DIALConstants
.
DIALCODES
))
val
hierarchyDialCodeStr
=
ScalaJsonUtils
.
serialize
(
imageCollectionHierarchy
.
get
(
DIALConstants
.
DIALCODES
))
val
hierarchyDialCode
=
ScalaJsonUtils
.
deserialize
(
hierarchyDialCodeStr
).
asInstanceOf
[
List
[
String
]]
imageChildrenAssignedDIALList
++
hierarchyDialCode
}
else
imageChildrenAssignedDIALList
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets