mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Check for blank (not null) values i asset transformer date
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
b3605fa141
commit
af66f83a3d
|
@ -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'];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue