Force flight to visible before day checks
This commit is contained in:
@@ -42,6 +42,9 @@ class SetActiveFlights extends Listener
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set to visible by default
|
||||||
|
$flight->visible = true;
|
||||||
|
|
||||||
// dates aren't set, so just save if there were any changes above
|
// dates aren't set, so just save if there were any changes above
|
||||||
// and move onto the next one
|
// and move onto the next one
|
||||||
if ($flight->start_date === null || $flight->end_date === null) {
|
if ($flight->start_date === null || $flight->end_date === null) {
|
||||||
@@ -56,9 +59,6 @@ class SetActiveFlights extends Listener
|
|||||||
.Days::in($flight->days, Days::$isoDayMap[(int) date('N')]));
|
.Days::in($flight->days, Days::$isoDayMap[(int) date('N')]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
Log::info('Toggling flight '.$flight->ident.' to visible');
|
|
||||||
$flight->visible = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$flight->save();
|
$flight->save();
|
||||||
@@ -82,9 +82,6 @@ class SetActiveFlights extends Listener
|
|||||||
.Days::in($flight->days, Days::$isoDayMap[(int) date('N')]));
|
.Days::in($flight->days, Days::$isoDayMap[(int) date('N')]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
Log::info('Toggling flight '.$flight->ident.' to visible');
|
|
||||||
$flight->visible = true;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$flight->visible = false;
|
$flight->visible = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user