Readd bids.disable_flight_on_bid, fixes tests
This commit is contained in:
@@ -209,7 +209,7 @@ class FlightService extends Service
|
||||
# bids
|
||||
$bids = Bid::where('user_id', $user->id)->get();
|
||||
if ($bids->count() > 0 && setting('bids.allow_multiple_bids') === false) {
|
||||
throw new BidExists('User "'.$user->id.'" already has bids, skipping');
|
||||
throw new BidExists('User "'.$user->ident.'" already has bids, skipping');
|
||||
}
|
||||
|
||||
# Get all of the bids for this flight
|
||||
@@ -229,6 +229,11 @@ class FlightService extends Service
|
||||
}
|
||||
}
|
||||
|
||||
# Check if the flight should be blocked off
|
||||
if (setting('bids.disable_flight_on_bid') === true) {
|
||||
throw new BidExists('Flight "'.$flight->ident.'" already has a bid, skipping');
|
||||
}
|
||||
|
||||
if (setting('bids.allow_multiple_bids') === false) {
|
||||
throw new BidExists('A bid already exists for this flight');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user