mirror of
				https://github.com/snipe/snipe-it.git
				synced 2025-10-29 19:31:41 +00:00 
			
		
		
		
	Adds check in condition that format custom dates
This commit is contained in:
		
							parent
							
								
									3e8837dd6e
								
							
						
					
					
						commit
						50c008ead5
					
				| @ -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), | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user