From 2fc8e684ba1ad97878b640cd339a857f57a24298 Mon Sep 17 00:00:00 2001 From: gfawcett Date: Thu, 29 Jul 2010 03:06:19 +0000 Subject: [PATCH] fix timespan midpoint arithmetic git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@940 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- conifer/syrup/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conifer/syrup/models.py b/conifer/syrup/models.py index 493d08b..21a4e4c 100644 --- a/conifer/syrup/models.py +++ b/conifer/syrup/models.py @@ -142,7 +142,7 @@ class Term(BaseModel): 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) -- 2.11.0