Using the transaction context manager to prevent ok