mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-23 10:18:56 +02:00
Allow to import category, footprint and manufacturer by giving a string in the CSV file
This commit is contained in:
parent
85ae862381
commit
61e2dde400
12 changed files with 173 additions and 35 deletions
|
@ -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']);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue