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
sunbird-lms-service
Commits
816ff8f4
Unverified
Commit
816ff8f4
authored
3 years ago
by
AMIT KUMAR
Committed by
GitHub
3 years ago
Browse files
Options
Download
Patches
Plain Diff
Issue #SB-27557 feat: put null check for lastName (#1015)
parent
0a5ba6b1
release-4.5.0
release-4.5.0_RC14
release-4.5.0_RC13
release-4.5.0_RC12
release-4.5.0_RC11
release-4.5.0_RC10
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
service/src/main/java/org/sunbird/actor/role/FetchUserRoleActor.java
+6
-2
.../main/java/org/sunbird/actor/role/FetchUserRoleActor.java
with
6 additions
and
2 deletions
+6
-2
service/src/main/java/org/sunbird/actor/role/FetchUserRoleActor.java
+
6
−
2
View file @
816ff8f4
...
...
@@ -4,6 +4,7 @@ import java.util.List;
import
java.util.Map
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.MapUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.sunbird.actor.core.BaseActor
;
import
org.sunbird.keys.JsonKey
;
import
org.sunbird.request.Request
;
...
...
@@ -50,8 +51,11 @@ public class FetchUserRoleActor extends BaseActor {
Map
<
String
,
Object
>
user
=
userService
.
getUserDetailsById
(
userId
,
request
.
getRequestContext
());
if
(
MapUtils
.
isNotEmpty
(
user
))
{
response
.
put
(
JsonKey
.
NAME
,
user
.
get
(
JsonKey
.
FIRST_NAME
)
+
" "
+
user
.
get
(
JsonKey
.
LAST_NAME
));
String
name
=
(
String
)
user
.
get
(
JsonKey
.
FIRST_NAME
);
if
(
StringUtils
.
isNotEmpty
((
String
)
user
.
get
(
JsonKey
.
LAST_NAME
)))
{
name
=
name
+
" "
+
user
.
get
(
JsonKey
.
LAST_NAME
);
}
response
.
put
(
JsonKey
.
NAME
,
name
);
}
}
response
.
put
(
JsonKey
.
ROLES
,
userRoles
);
...
...
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