No need to do two queries here, simplify by doing:

```python
result = Result.objects.get(sample=sample, variant__rsid=dbsnp_value)
```