diff --git a/app/notifications/repository_item_date_notification.rb b/app/notifications/repository_item_date_notification.rb index ba41d6757..add33350f 100644 --- a/app/notifications/repository_item_date_notification.rb +++ b/app/notifications/repository_item_date_notification.rb @@ -6,11 +6,11 @@ class RepositoryItemDateNotification < BaseNotification end def title - unit = human_readable_unit(column.metadata['reminder_unit'], column.metadata['reminder_value']) + unit = human_readable_unit(params[:reminder_unit], params[:reminder_value]) I18n.t( 'notifications.content.item_date_reminder.message_html', repository_row_name: subject.name, - value: column.metadata['reminder_value'], + value: params[:reminder_value], units: unit ) end @@ -21,12 +21,6 @@ class RepositoryItemDateNotification < BaseNotification NonExistantRecord.new(params[:repository_row_name]) end - def column - RepositoryColumn.find(params[:repository_column_id]) - rescue ActiveRecord::RecordNotFound - NonExistantRecord.new(params[:repository_column_name]) - end - after_deliver do if params[:repository_date_time_value_id] RepositoryDateTimeValue.find(params[:repository_date_time_value_id]).update(notification_sent: true)