1๐
โ
I was trying to evaluate a query set object, not the object itself. Executing a get on the query set and then a lookup of the relation set worked fine. Iโm changing to community wiki and leaving this here just incase someone else is as stupid as I was.
A working example:
resident = Resident.objects.filter(name='Johnny')
resident.ssa_set.all() # fail
resident = resident.get() # will fail if more than one returned by filter
resident.ssa_set.all() # works, since we're operating on an instance, not a queryset
๐คJosh Smeaton
Source:stackexchange.com