From af66f83a3dedbc29f483773dddb3d0112636c81a Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 15 Jun 2022 13:42:30 -0700 Subject: [PATCH] Check for blank (not null) values i asset transformer date Signed-off-by: snipe --- app/Http/Transformers/AssetsTransformer.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Http/Transformers/AssetsTransformer.php b/app/Http/Transformers/AssetsTransformer.php index 4abb4b9201..30b835d488 100644 --- a/app/Http/Transformers/AssetsTransformer.php +++ b/app/Http/Transformers/AssetsTransformer.php @@ -111,13 +111,12 @@ class AssetsTransformer 'value' => e($value), 'field_format' => $field->format, 'element' => $field->element, - ]; } else { $value = $asset->{$field->convertUnicodeDbSlug()}; - if ($field->format == 'DATE' && !is_null($value)){ + if (($field->format == 'DATE') && (!is_null($value)) && ($value!='')){ $value = Helper::getFormattedDateObject($value)['formatted']; }