diff getan/project.py @ 478:950bfe89ec3d

Updates "All project" time when the entrie time is adjusted. Displays the correct total time.
author Magnus Schieder <mschieder@intevation.de>
date Fri, 11 May 2018 14:27:48 +0200
parents 050ffdec60d9
children 999a438474f2
line wrap: on
line diff
--- a/getan/project.py	Wed May 09 19:06:20 2018 +0200
+++ b/getan/project.py	Fri May 11 14:27:48 2018 +0200
@@ -32,6 +32,12 @@
         self.stop = None
         self.open= None
 
+    def update_total(self):
+        total = 0
+        for entry in self.entries:
+            total += (entry.end - entry.start).seconds
+        self.total = total
+
     def year(self):
         total = 0
         now = datetime.now()
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)