For a property, I can't manage to filter a Queryset with another property. I want that if "father" has "Star" in "True", "star_descendant" returns "father".
I have this error: Exception Value: 'QuerySet' object has no attribute 'star'. How to fix it?
My code :
@property
def star(self):
if Evenements.objects.filter(eventtype=93).filter(xrefindividuproprio=self):
return True
return False
@property
def star_descendant(self):
father = Individus.objects.filter(codeid=self.xrefpere_id)
mother = Individus.objects.filter(codeid=self.xrefmere_id)
if father.star == True:
return father