diff --git a/app/views/layouts/_lte_admin_navbar.html.erb b/app/views/layouts/_lte_admin_navbar.html.erb index be68d89385..5b46468b86 100644 --- a/app/views/layouts/_lte_admin_navbar.html.erb +++ b/app/views/layouts/_lte_admin_navbar.html.erb @@ -2,11 +2,19 @@ <%= current_user.display_name %> + - \ No newline at end of file + diff --git a/app/views/layouts/_lte_navbar.html.erb b/app/views/layouts/_lte_navbar.html.erb index 006889d397..f90c40914d 100644 --- a/app/views/layouts/_lte_navbar.html.erb +++ b/app/views/layouts/_lte_navbar.html.erb @@ -69,7 +69,7 @@ <% current_user.switchable_roles.each do |role| %> <% next if role == current_role %> <%= link_to switch_to_role_users_path(role_id: role.id), class:"dropdown-item" do %> - <%= "Switch to: #{role.resource.name}" %> + <%= "Switch to: #{role.resource&.name || "Super Admin"}" %> <% end %> <% end %> <% if current_organization.id.present? &&