Na Řešení ukazuje FK u ŘešeníNode
This commit is contained in:
parent
d0a7caa032
commit
a341eba928
1 changed files with 1 additions and 0 deletions
|
@ -1139,6 +1139,7 @@ class Reseni(SeminarModelBase):
|
|||
|
||||
# má ForeignKey s:
|
||||
# Hodnoceni
|
||||
# ReseniNode
|
||||
|
||||
def sum_body(self):
|
||||
return self.hodnoceni_set.all().aggregate(Sum('body'))["body__sum"]
|
||||
|
|
Loading…
Reference in a new issue