Fix types and codes import

This commit is contained in:
Nabeel Shahzad
2018-03-22 19:59:35 -05:00
parent 112a72ac6f
commit 8b53ca2fdc
5 changed files with 47 additions and 4 deletions

View File

@@ -60,8 +60,11 @@ class AircraftImporter extends ImportExport
}
# Set a default status
if($row['status'] === null) {
$row['status'] = trim($row['status']);
if($row['status'] === null || $row['status'] === '') {
$row['status'] = AircraftStatus::ACTIVE;
} else {
$row['status'] = AircraftStatus::getFromCode($row['status']);
}
# Just set its state right now as parked