I have this in my template:
{% for j in jobs %}
<tbody>
{% if j.background.all.0.active == False %}
...
I need to make a filter in the view similar to this.
I tried
jobs = jobs.filter(background__first__active=False)
But I know it's completely wrong.
To know background is a ManyToMany that contains a field called active, but I just want to get the first item.
How do I make this filter?