fix hours returned for DataStore.get*Hours()

This commit is contained in:
Josh Holtrop 2011-02-25 20:44:52 -05:00
parent 9463dc489c
commit a8222d3247

View File

@ -125,8 +125,6 @@ WHERE hours.date = ?
pid, tid, secs = row
if not pid in hours:
hours[pid] = {}
if not tid in hours[pid]:
hours[pid] = {}
hours[pid][tid] = secs
c.close()
self.conn.commit()
@ -144,12 +142,8 @@ WHERE hours.date = ?
GROUP BY projects.id
''', (date,))
for row in c:
pid, tid, secs = row
if not pid in hours:
hours[pid] = {}
if not tid in hours[pid]:
hours[pid] = {}
hours[pid][tid] = secs
pid, secs = row
hours[pid] = secs
c.close()
self.conn.commit()
return hours