Created
November 27, 2019 18:44
-
-
Save rodrigoddc/9bacd1cd3fa8add4c2d0506a077f3504 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @property | |
| def total_hora_extra(self): | |
| if self.registrohoraextra_set.filter(utilizada=False) != 0: | |
| total = self.registrohoraextra_set.filter(utilizada=False).aggregate(Sum('horas'))['horas__sum'] | |
| return total | |
| else: | |
| return 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment