Must be because the ```create_switch``` was working. So you can try the decorator + the create_switch without the ```db=True```. If that doesn't work, just leave a decorator here and use ```db=True``` on ```create_switch```.