mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-13 06:47:46 -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),
|
'value' => e($value),
|
||||||
'field_format' => $field->format,
|
'field_format' => $field->format,
|
||||||
'element' => $field->element,
|
'element' => $field->element,
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$value = $asset->{$field->convertUnicodeDbSlug()};
|
$value = $asset->{$field->convertUnicodeDbSlug()};
|
||||||
|
|
||||||
if ($field->format == 'DATE' && !is_null($value)){
|
if (($field->format == 'DATE') && (!is_null($value)) && ($value!='')){
|
||||||
$value = Helper::getFormattedDateObject($value)['formatted'];
|
$value = Helper::getFormattedDateObject($value)['formatted'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue