Cleanup the cancelled PIREP logic

This commit is contained in:
Nabeel Shahzad
2018-05-11 12:08:55 -05:00
parent 605bf477ad
commit bc7fccfb95
5 changed files with 28 additions and 26 deletions

View File

@@ -58,7 +58,7 @@ class AcarsController extends Controller
*/
protected function checkCancelled(Pirep $pirep)
{
if (!$pirep->allowedUpdates()) {
if ($pirep->cancelled) {
throw new PirepCancelled();
}
}

View File

@@ -102,7 +102,7 @@ class PirepController extends Controller
*/
protected function checkCancelled(Pirep $pirep)
{
if (!$pirep->allowedUpdates()) {
if ($pirep->cancelled) {
throw new PirepCancelled();
}
}