mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Set nullable type for Backup
This commit is contained in:
parent
c581c183ac
commit
7604bf28e6
@ -27,8 +27,11 @@ class InvoiceHistoryTransformer extends EntityTransformer
|
|||||||
'activity',
|
'activity',
|
||||||
];
|
];
|
||||||
|
|
||||||
public function transform(Backup $backup)
|
public function transform(?Backup $backup)
|
||||||
{
|
{
|
||||||
|
if(!$backup)
|
||||||
|
return [];
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'id' => $this->encodePrimaryKey($backup->id),
|
'id' => $this->encodePrimaryKey($backup->id),
|
||||||
'activity_id' => $this->encodePrimaryKey($backup->activity_id),
|
'activity_id' => $this->encodePrimaryKey($backup->activity_id),
|
||||||
|
Loading…
Reference in New Issue
Block a user