Fix utils.appliance

Remove appliance.db_session()

Fix appliance.rename()