Had to think about why you're calling this method 'end_' rather than 'delete_' but it makes sense. If you tell a future scheduled maintenance to end before it starts I guess it's reasonable that causes it to disappear in a puff of smoke.