Check for blank values on import and omit them (#1266)

* Check for blank values on import and omit them

* Add paused status to the pirep changed
This commit is contained in:
Nabeel S
2021-07-22 15:56:03 -04:00
committed by GitHub
parent 78d3c6b577
commit 88a8ffe48a
4 changed files with 18 additions and 0 deletions

View File

@@ -212,6 +212,11 @@ class FlightImporter extends ImportExport
$count = 0;
$subfleets = $this->parseMultiColumnValues($col);
foreach ($subfleets as $subfleet_type) {
$subfleet_type = trim($subfleet_type);
if (empty($subfleet_type)) {
continue;
}
$subfleet = Subfleet::firstOrCreate(
['type' => $subfleet_type],
['name' => $subfleet_type]