Why the name `temp`? `webhooks` will be fine unless it conflicts with some other local var. Also, this file changes can be written as 
```python
if hasattr(policy, 'webhooks'):
    policy.webhooks = [Webhook._dict_to_obj(w) for w in policy.webhooks]
```