Assuming you have a instance of the p
class in self.p
then the queryset
S.objects.filter(r__p=self.p)
would work. Next time put a bit more effort into your question though or people won’t want to put effort into an answer.
1
solved Queryset inside fk attribute