FIX: insert commas even when field value is null (#14791)

This commit is contained in:
Arpit Jalan 2021-11-02 14:59:24 +05:30 committed by GitHub
parent 7dcecef4c3
commit aeaf27b7dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -317,7 +317,11 @@ module Jobs
def add_group_names(user, user_info_array)
group_names = user.groups.map { |g| g.name }.join(";")
user_info_array << escape_comma(group_names) if group_names.present?
if group_names.present?
user_info_array << escape_comma(group_names)
else
user_info_array << nil
end
user_info_array
end