Skip to content

Commit

Permalink
Merge pull request #460 from City-of-Helsinki/develop
Browse files Browse the repository at this point in the history
Release (2) 21.9
  • Loading branch information
tvalimaa authored Sep 21, 2023
2 parents cd9bfa3 + c878f7f commit 30ff489
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ private function getFilesFromLocal() {
* Run migrations.
*/
public function migrate(): array {
getFilesFromTmp();
self::getFilesFromTmp();

$errors = $this->migrateProjects();

Expand Down Expand Up @@ -178,11 +178,8 @@ private function migrateProjects(): array {

if (!$district) {
$errors[] = "Error with the project $currentProjectId. Error in create district term.";
continue;
}
else {
$project->field_district->entity = $district;
}
$project->field_district->entity = $district;

if ($project) {
if (feof($this->file2)) {
Expand Down Expand Up @@ -367,8 +364,8 @@ private function getTerm(array $terms, string $term, string $vid) {
return reset($terms);
}

if (preg_match('~[0-9]+~', $term)) {
return FALSE;
if (preg_match('~[0-9]+~', $term) || empty($term)) {
return NULL;
}

try {
Expand Down

0 comments on commit 30ff489

Please sign in to comment.