diff --git a/app/views/my_modules/_module_header_details_popover.html.erb b/app/views/my_modules/_module_header_details_popover.html.erb index 8b00a6b3a..565466684 100644 --- a/app/views/my_modules/_module_header_details_popover.html.erb +++ b/app/views/my_modules/_module_header_details_popover.html.erb @@ -25,7 +25,7 @@
- <%= @my_module.created_by.full_name.truncate(Constants::MAX_NAME_TRUNCATION) %> + <%= @my_module.created_by&.full_name&.truncate(Constants::MAX_NAME_TRUNCATION) %> <%= t('my_modules.module_header.details_popover.creator_same_user_label') if current_user == @my_module.created_by %>
@@ -46,9 +46,14 @@
- <%= t('my_modules.module_header.details_popover.modified_value', - date: l(@my_module.updated_at, format: :full_date), - full_name: @my_module.last_modified_by.full_name.truncate(Constants::MAX_NAME_TRUNCATION)) %> + <% if @my_module.last_modified_by.present? %> + <%= t('my_modules.module_header.details_popover.modified_value', + date: l(@my_module.updated_at, format: :full_date), + full_name: @my_module.last_modified_by.full_name.truncate(Constants::MAX_NAME_TRUNCATION)) %> + <% else %> + <%= t('my_modules.module_header.details_popover.modified_value_without_user', + date: l(@my_module.updated_at, format: :full_date)) %> + <% end %>
diff --git a/config/locales/en.yml b/config/locales/en.yml index b444ea5fa..d2a39e18c 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -649,6 +649,7 @@ en: created_label: "Created" modified_label: "Modified" modified_value: "%{date} by %{full_name}" + modified_value_without_user: "%{date}" start_date: "Start date:" no_start_date: "not set" no_start_date_placeholder: "+ Add starting date"