tainacan legacy importer - skip duplication in term creation

This commit is contained in:
eduardohumberto 2018-09-17 22:36:14 -03:00
parent a832427679
commit 1cb7f118d6
1 changed files with 5 additions and 0 deletions

View File

@ -643,6 +643,11 @@ class Old_Tainacan extends Importer{
if($term_father){
$new_term->set_parent($term_father->get_id());
}
// block terms with same name and parent in taxonomy
if( get_term_by( 'name', $term->name, $taxonomy_father->get_db_identifier()) ){
continue;
}
$inserted_term = $this->term_repo->insert($new_term);