diff --git a/app/Http/Transformers/AssetsTransformer.php b/app/Http/Transformers/AssetsTransformer.php index 49b74b1e96..4abb4b9201 100644 --- a/app/Http/Transformers/AssetsTransformer.php +++ b/app/Http/Transformers/AssetsTransformer.php @@ -117,9 +117,10 @@ class AssetsTransformer } else { $value = $asset->{$field->convertUnicodeDbSlug()}; - if ($field->format == 'DATE'){ + if ($field->format == 'DATE' && !is_null($value)){ $value = Helper::getFormattedDateObject($value)['formatted']; } + $fields_array[$field->name] = [ 'field' => e($field->convertUnicodeDbSlug()), 'value' => e($value),