mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-03 22:15:36 +01:00
Allow to import category, footprint and manufacturer by giving a string in the CSV file
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
namespace App\Serializer;
|
||||
|
||||
use App\Entity\Base\AbstractStructuralDBElement;
|
||||
use Symfony\Component\Serializer\Normalizer\ContextAwareDenormalizerInterface;
|
||||
use Symfony\Component\Serializer\Normalizer\ContextAwareNormalizerInterface;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
|
||||
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
|
||||
@@ -48,7 +49,7 @@ class StructuralElementNormalizer implements ContextAwareNormalizerInterface
|
||||
$data = $this->normalizer->normalize($object, $format, $context);
|
||||
|
||||
//Remove type field for CSV export
|
||||
if ($format == 'csv') {
|
||||
if ($format === 'csv') {
|
||||
unset($data['type']);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user