def add_snake(account, name, length, species, is_venomous) -> Snake: snake = Snake() snake.name = name snake.length = length snake.species = species snake.is_venomous = is_venomous snake.save() owner = find_account_by_email(account.email) owner.snake_ids.append(snake.id) owner.save() return snake
def add_snake(account, name, length, species, is_venomous) -> Snake: snake = Snake() snake.name = name snake.length = length snake.species = species snake.is_venomous = is_venomous snake.save() owner = find_account_by_email(account.email) owner.snake_ids.append(snake.id) owner.save() return snake
def add_snake(account: Owner, name: str, length: float, species: str, is_venomous: bool) -> Snake: snake = Snake() snake.name = name snake.length = length snake.species = species snake.is_venomous = is_venomous snake.save() owner, msg = find_account_by_email(account.email, account.password) owner.snake_ids.append(snake.id) owner.save() return snake
def add_snake(account: Owner, nme, spcs, len, is_ven): snake = Snake() snake.species = spcs snake.length = len snake.name = nme snake.is_venomous = is_ven snake.save() owner = find_account_by_email(account.email) owner.snake_ids.append(snake.id) owner.save() return snake