Skip to content
Snippets Groups Projects
Unverified Commit 110aa2d1 authored by Sebastian Castro's avatar Sebastian Castro
Browse files

Fix watching change of taxonomy : remove empty value

parent b19ac7ee
No related branches found
No related tags found
No related merge requests found
......@@ -103,6 +103,8 @@ class ImportAdminController extends Controller
$this->admin->checkAccess('edit', $object);
$this->admin->setSubject($object);
$oldUpdatedAt = $object->getMainConfigUpdatedAt();
$form = $this->admin->getForm();
$form->setData($object);
$form->handleRequest($request);
......@@ -198,15 +200,13 @@ class ImportAdminController extends Controller
$object->setNewOntologyToMap(false);
$object->setNewTaxonomyToMap(false);
$oldUpdatedAt = $object->getMainConfigUpdatedAt();
// check manually for taxonomy change
if ($object->getTaxonomyMapping() != $currentTaxonomyMapping) {
$object->setMainConfigUpdatedAt(time());
}
$object = $this->admin->update($object);
// auto collect data if the import config have changed
if ($request->get('import')) {
$url = $this->admin->generateUrl('refresh', ['id' => $object->getId()]);
......
......@@ -568,6 +568,7 @@ class Import extends AbstractFile
'collectedPercent' => null
];
}
$mappedObject['mappedCategoryIds'] = array_filter($mappedObject['mappedCategoryIds']);
}
ksort($this->taxonomyMapping);
uasort($this->taxonomyMapping, function($a,$b) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment