diff --git a/app/decorators/tiding_decorator.rb b/app/decorators/tiding_decorator.rb index 77bbcf9e3..d1f6f08e6 100644 --- a/app/decorators/tiding_decorator.rb +++ b/app/decorators/tiding_decorator.rb @@ -47,13 +47,13 @@ module TidingDecorator # ================ 各种类消息内容方法 ================ def apply_user_authentication_content - return if trigger_user_id.zero? + t_user = trigger_user || User.find(1) if tiding_type == 'Apply' str1, str2 = if container.auth_type == 1 - [trigger_user.show_real_name, trigger_user.ID_number] + [t_user.show_real_name, t_user.ID_number] elsif container.auth_type == 2 - ue = trigger_user.user_extension + ue = t_user.user_extension [[ue.school&.name, ue.department&.name].join('_'), ue.identity_text] end I18n.t(locale_format(tiding_type, container.auth_type)) % [str1, str2]