fix hours returned for DataStore.get*Hours()
This commit is contained in:
parent
9463dc489c
commit
a8222d3247
10
DataStore.py
10
DataStore.py
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user