From 382ab1e10d67e861620dbbdb3f26d30382d8cf88 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 4 Feb 2024 17:11:56 +1100 Subject: [PATCH] Fixes for edge cases in reports --- app/Export/CSV/BaseExport.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Export/CSV/BaseExport.php b/app/Export/CSV/BaseExport.php index 1cfd5bf6d880..344dc129dab4 100644 --- a/app/Export/CSV/BaseExport.php +++ b/app/Export/CSV/BaseExport.php @@ -451,7 +451,7 @@ class BaseExport { if (isset($this->input['client_id']) && $this->input['client_id'] != 'all') { $client = Client::withTrashed()->find($this->input['client_id']); - $this->client_description = $client->present()->name; + $this->client_description = $client->present()->name ?? ''; return $query->where('client_id', $this->input['client_id']); } elseif(isset($this->input['clients']) && count($this->input['clients']) > 0) {