Failsafe for SimBrief random pax generation (#1015)
* Failsafe for SimBrief random pax generation PR fixes the problem for 0 load generation where va admins do not set load factor and variance values for their flights and also leave the general settings empty. In such cases, both loadmin and loadmax was returning 0 , resulting zero load. Thanks @macofallico for figuring this out. * StyleFix
This commit is contained in:
parent
6b3207377a
commit
5a570989de
@ -109,6 +109,11 @@ class SimBriefController
|
||||
|
||||
$loadmax = $lfactor + $lfactorv;
|
||||
$loadmax = $loadmax > 100 ? 100 : $loadmax;
|
||||
// Failsafe for admins not defining load values for their flights
|
||||
// and also leave the general settings empty, set loadmax to 100
|
||||
if ($loadmax === 0) {
|
||||
$loadmax = 100;
|
||||
}
|
||||
|
||||
// Show the main simbrief form
|
||||
return view('flights.simbrief_form', [
|
||||
|
Loading…
Reference in New Issue
Block a user