소스 검색

Fix archiving locations not respecting the dry run flag

Alan Lam 9 달 전
부모
커밋
df6414b4fa
1개의 변경된 파일과 5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      tasks/import_venues.php

+ 5 - 1
tasks/import_venues.php

@@ -343,8 +343,12 @@ for($i = 0; $data = fgetcsv($handle); $i++) {
 if($archive_missing) {
 	foreach($missing_locations as $missing_location) {
 		echo sprintf("Location#%s - %s archived.\n", $missing_location->id, $missing_location->name);
+
 		$missing_location->archived = 1;
-		$missing_location->commit();
+
+		if(!$dry_run) {
+			$missing_location->commit();
+		}
 	}
 }