MT-85: The same validation has been added to the keep uid process.

This commit is contained in:
Gustavo Adolfo Cruz Laura
2016-04-02 10:57:56 -04:00
parent 2783d0498f
commit f20b3dd48a
2 changed files with 61 additions and 35 deletions

View File

@@ -182,16 +182,13 @@ class GranularImporter
* @return bool
* @throws \Exception
*/
public function validateImportData($objectList, $generateUid = false)
public function validateImportData($objectList)
{
try {
if ($generateUid) {
if (count($objectList) !== count($this->exportObjects->getObjectsList())) {
$exception = new ImportException();
$exception->setNameException(\G::LoadTranslation('ID_PROCESS_DEFINITION_INCOMPLETE'));
throw($exception);
}
if (count($objectList) !== count($this->exportObjects->getObjectsList())) {
$exception = new ImportException();
$exception->setNameException(\G::LoadTranslation('ID_PROCESS_DEFINITION_INCOMPLETE'));
throw($exception);
}
return true;
} catch (\Exception $e) {