src/backend/catalog/src/release-flight/release.py [7:30]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
session = boto3.Session()
dynamodb = session.resource('dynamodb')
table = dynamodb.Table(os.environ['FLIGHT_TABLE_NAME'])


class FlightReservationException(Exception):
    pass


class FlightFullyBookedException(FlightReservationException):
    pass


class FlightDoesNotExistException(FlightReservationException):
    pass


def reserve_seat_on_flight(flight_id):
    try:
        # TODO: This needs to find the max. In theory, we should never have a situation
        #       where we're trying to increment the seat when one hasn't been
        #       decremented, but just to be sure.
        table.update_item(
            Key={"id": flight_id},
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/backend/catalog/src/reserve-flight/reserve.py [7:27]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
session = boto3.Session()
dynamodb = session.resource('dynamodb')
table = dynamodb.Table(os.environ['FLIGHT_TABLE_NAME'])


class FlightReservationException(Exception):
    pass


class FlightFullyBookedException(FlightReservationException):
    pass


class FlightDoesNotExistException(FlightReservationException):
    pass


def reserve_seat_on_flight(flight_id):
    try:
        table.update_item(
            Key={"id": flight_id},
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



