fix hours returned for DataStore.get*Hours()
This commit is contained in:
1 parent
9463dc489c
commit
a8222d3247
1 file changed
+2
-8
+2
-8
@@ -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
|
||||
Reference in new issue
Block a user