1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 16:31:33 +02:00

Set nullable type for Backup

This commit is contained in:
David Bomba 2021-09-26 20:46:49 +10:00
parent c581c183ac
commit 7604bf28e6

View File

@ -27,8 +27,11 @@ class InvoiceHistoryTransformer extends EntityTransformer
'activity',
];
public function transform(Backup $backup)
public function transform(?Backup $backup)
{
if(!$backup)
return [];
return [
'id' => $this->encodePrimaryKey($backup->id),
'activity_id' => $this->encodePrimaryKey($backup->activity_id),