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

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

diff --git a/app/jobs/regular/export_csv_file.rb b/app/jobs/regular/export_csv_file.rb
index 4ff6d1a..262e871 100644
--- a/app/jobs/regular/export_csv_file.rb
+++ b/app/jobs/regular/export_csv_file.rb
@@ -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
 

GitHub sha: aeaf27b7dca44e9175c4b5c901fb57f84cf9db51

This commit appears in #14791 which was approved by CvX. It was merged by techAPJ.

This commit has been mentioned on Discourse Meta. There might be relevant details there: