Last active
January 28, 2020 12:53
-
-
Save uday12kumar/b34791557c129bdf13e754fe21ddab03 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def book(self, seats_selected,slot_id): | |
if self.seats < self.seats_selected: | |
raise errors.InsufficientSeats() | |
self.seats -= seats_selected | |
self.save() | |
def cancel_booking(self, seats_selected): | |
self.seats += seats_selected | |
self.save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment