I created a Python script that calculates fields of newly added points. When I run the script in ArcGIS Pro 2.5 everything works correctly, but when I upgraded to version 2.7.3 of Pro, 3 of the fields no longer populate. I don't get any errors from the script. Thanks in advance for any help!
import arcpy
#Setup the user inputs
customerPointSelection = arcpy.GetParameterAsText(0)
customerPoint = arcpy.GetParameterAsText(1)
automatedCollection = arcpy.GetParameterAsText(2)
#Create a spatial join between customerPointSelection and automatedCollection
arcpy.SpatialJoin_analysis(customerPointSelection, automatedCollection, "in_memory/CustomerAutoJoin", "JOIN_ONE_TO_MANY","KEEP_COMMON","","WITHIN")
#Create a new join to the customerPoint
arcpy.AddJoin_management(customerPoint,"OBJECTID","in_memory/CustomerAutoJoin","TARGET_FID","KEEP_COMMON")
#Calculate the needed fields
arcpy.CalculateField_management(customerPoint,"SEC_NAME","!CustomerAutoJoin.SEC_NAME_1!","PYTHON3","","TEXT")
arcpy.CalculateField_management(customerPoint,"COLLECT_DAY","!CustomerAutoJoin.DAY!","PYTHON3","","TEXT")
arcpy.management.CalculateField(customerPoint,"QUAD","!CustomerAutoJoin.QUAD_1!","PYTHON3","","TEXT")
arcpy.CalculateField_management(customerPoint,"HELP_SECTION","!CustomerAutoJoin.HELP_SECTION_1!","PYTHON3","","SHORT")
#Remove the join and delete the in memory feature
arcpy.RemoveJoin_management(customerPoint)
arcpy.Delete_management("in_memory/CustomerAutoJoin")