0

In a django-project I have the following line:

person_lista = Personal.objects.annotate(tjgtid=Sum('personyear__tjgtim'))

When the class PersonYear contained the variable

tjgtim = models.FloatField(default=0)

this worked fine. But now I have changed it so that it is a function:

def tjgtim:
    return .....

and now it does not work. Why is that? What should I do differently?

Thanks in advance, -anders

anders
  • 81
  • 6

0 Answers0