I think the template makes a db call; before we had the `progress` function, not having this context_manager caused a transaction error