correct a variable name
This commit is contained in:
parent
de4bd2be7e
commit
d20f42b28c
|
@ -32,11 +32,11 @@ namespace AirlineServer
|
|||
}
|
||||
public Flight CancelFlight(Flight flight, int numberOfSeats)
|
||||
{
|
||||
Flight flightToBook = this.flights.Single(f => f == flight);
|
||||
if (flightToBook != null)
|
||||
Flight flightToCancel = this.flights.Single(f => f == flight);
|
||||
if (flightToCancel != null)
|
||||
{
|
||||
flightToBook.BookedSeats -= numberOfSeats;
|
||||
return flightToBook;
|
||||
flightToCancel.BookedSeats -= numberOfSeats;
|
||||
return flightToCancel;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue