FIX: Manually update DirectoryItemSerializer attributes on directory column change (#13503)

FIX: Manually update DirectoryItemSerializer attributes on directory column change (#13503)

diff --git a/app/controllers/edit_directory_columns_controller.rb b/app/controllers/edit_directory_columns_controller.rb
index b40d13c..b80b230 100644
--- a/app/controllers/edit_directory_columns_controller.rb
+++ b/app/controllers/edit_directory_columns_controller.rb
@@ -30,11 +30,17 @@ class EditDirectoryColumnsController < ApplicationController
       end
     end
 
+    update_directory_item_serializer_attributes
+
     render json: success_json
   end
 
   private
 
+  def update_directory_item_serializer_attributes
+    ::DirectoryItemSerializer.attributes(*DirectoryColumn.active_column_names)
+  end
+
   def ensure_user_fields_have_columns
     user_fields_without_column =
       UserField.left_outer_joins(:directory_column)

GitHub sha: a9175b77057cfbf315d9be30b693253948f2a9a7

This commit appears in #13503 which was approved by eviltrout. It was merged by markvanlan.