[open-ils-commits] r940 - servres/trunk/conifer/syrup (gfawcett)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Jul 28 23:06:21 EDT 2010
Author: gfawcett
Date: 2010-07-28 23:06:19 -0400 (Wed, 28 Jul 2010)
New Revision: 940
Modified:
servres/trunk/conifer/syrup/models.py
Log:
fix timespan midpoint arithmetic
Modified: servres/trunk/conifer/syrup/models.py
===================================================================
--- servres/trunk/conifer/syrup/models.py 2010-07-28 03:17:48 UTC (rev 939)
+++ servres/trunk/conifer/syrup/models.py 2010-07-29 03:06:19 UTC (rev 940)
@@ -142,7 +142,7 @@
return '%s: %s' % (self.code, self.name)
def midpoint(self):
- return self.start + timedelta(days=(self.start-self.finish).days/2)
+ return self.start + (self.finish-self.start) / 2
class Department(BaseModel):
name = m.CharField(max_length=256)
More information about the open-ils-commits
mailing list