diff --git a/app/controllers/smart_annotations_controller.rb b/app/controllers/smart_annotations_controller.rb
index 1ec2abf68..3ab743b75 100644
--- a/app/controllers/smart_annotations_controller.rb
+++ b/app/controllers/smart_annotations_controller.rb
@@ -27,9 +27,9 @@ class SmartAnnotationsController < ApplicationController
avatar_url: user_avatar_absolute_url(resource, :thumb),
info: I18n.t(
'atwho.users.popover_html',
- role: user_team_assignment.user_role.name.capitalize,
- team: user_team_assignment.assignable.name,
- time: I18n.l(user_team_assignment.created_at, format: :full_date)
+ role: user_team_assignment ? user_team_assignment.user_role.name.capitalize : '/',
+ team: user_team_assignment ? user_team_assignment.assignable.name : I18n.t('atwho.users.not_in_this_team'),
+ time: user_team_assignment ? I18n.l(user_team_assignment.created_at, format: :full_date) : '/'
)
}
end
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 5c9689ecd..357c37c67 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -3937,7 +3937,7 @@ en:
title: 'Insert custom well plate'
name_label: 'Well plate name'
name_placeholder: 'Plate'
- dimension_label: 'Dimensions (rows x columns)'
+ dimension_label: 'Dimensions (rows x columns)'
options:
up_arrow_title: "Move step up"
down_arrow_title: "Move step down"
@@ -4227,6 +4227,7 @@ en:
title: "People"
header: "Type the name or email of the user you want to mention (they will be notified)"
help: "Navigate: ↑ ↓ • Insert: Enter / Tab • Dismiss: Esc"
+ not_in_this_team: 'Not in this team'
popover_html: "Team: %{team}
Role: %{role}
Joined: %{time}"
res:
archived: "(archived)"