fixed breaking tests

This commit is contained in:
Juan David Martinez 2025-03-14 16:07:40 -05:00
parent 4bacf2c5af
commit 6f7a7ab363
No known key found for this signature in database
GPG Key ID: FE50F4B983E68D5B
1 changed files with 2 additions and 1 deletions

View File

@ -492,7 +492,8 @@ class ::Assigner
end
def small_action_username_or_name(assign_to)
if (assign_to.is_a?(User) && SiteSetting.prioritize_full_name_in_ux) || !assign_to.username
if (assign_to.is_a?(User) && SiteSetting.prioritize_full_name_in_ux) ||
!assign_to.try(:username)
custom_fields = { "action_code_who" => assign_to.name || assign_to.username }
else
custom_fields = {