From 4c93e19c19d9de8a571f3530868b269503343ca0 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Mon, 10 Aug 2026 16:16:39 -0400 Subject: [PATCH] Only show appointments if thye exist --- lib/redmine_qbo_calendar/hooks/customer_show_hook_listener.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/redmine_qbo_calendar/hooks/customer_show_hook_listener.rb b/lib/redmine_qbo_calendar/hooks/customer_show_hook_listener.rb index 1be002a..7a7f9d4 100644 --- a/lib/redmine_qbo_calendar/hooks/customer_show_hook_listener.rb +++ b/lib/redmine_qbo_calendar/hooks/customer_show_hook_listener.rb @@ -22,7 +22,7 @@ module RedmineQboCalendar customer = context[:customer] appointments = customer.customer_appointments.where('date >= ?', Date.today).order(date: :asc) - return if appointments.nil? + return if appointments.empty? context[:controller].send(:render_to_string, { partial: 'customer_appointments/list_simple', locals: { appointments: appointments }