should be:
```
if 'status' not in data or data['status'] != 'discover':
```