From d4a8eb6396c4c4f7753db54b539c7e63a8aff7cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Thu, 19 Dec 2024 16:03:30 +0100 Subject: [PATCH] Accept that work package can be empty on time entry --- .../reporting/app/workers/cost_query/pdf/timesheet_generator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/reporting/app/workers/cost_query/pdf/timesheet_generator.rb b/modules/reporting/app/workers/cost_query/pdf/timesheet_generator.rb index 647daa18814b..a383441f723c 100644 --- a/modules/reporting/app/workers/cost_query/pdf/timesheet_generator.rb +++ b/modules/reporting/app/workers/cost_query/pdf/timesheet_generator.rb @@ -137,7 +137,7 @@ def build_table_day_rows(spent_on, entries) def build_table_row(spent_on, entry) [ { content: format_date(spent_on), rowspan: entry.comments.present? ? 2 : 1 }, - entry.work_package.subject || "", + entry.work_package&.subject || "", with_times_column? ? format_spent_on_time(entry) : nil, format_hours(entry.hours), entry.activity&.name || ""