I have a main property that has a structured property. I have a property defined inside the structured property and it needs access to the parent property's values. The syntax I tried was self.key.parent().email
, but that didn't do the trick. How can I do this?
class Individual(ndb.Expando):
name = ndb.StringProperty()
email = ndb.StringProperty()
team_list = ndb.StructuredProperty(IndividualTeam, repeated=True)
class IndividualTeam(ndb.Model):
team_key = ndb.KeyProperty()
fundraise_amt = DecimalProperty()
@property
def donation_total(self):
#This is my problem here
return self.key.parent().email