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
|
pid, tid, secs = row
|
||||||
if not pid in hours:
|
if not pid in hours:
|
||||||
hours[pid] = {}
|
hours[pid] = {}
|
||||||
if not tid in hours[pid]:
|
|
||||||
hours[pid] = {}
|
|
||||||
hours[pid][tid] = secs
|
hours[pid][tid] = secs
|
||||||
c.close()
|
c.close()
|
||||||
self.conn.commit()
|
self.conn.commit()
|
||||||
@ -144,12 +142,8 @@ WHERE hours.date = ?
|
|||||||
GROUP BY projects.id
|
GROUP BY projects.id
|
||||||
''', (date,))
|
''', (date,))
|
||||||
for row in c:
|
for row in c:
|
||||||
pid, tid, secs = row
|
pid, secs = row
|
||||||
if not pid in hours:
|
hours[pid] = secs
|
||||||
hours[pid] = {}
|
|
||||||
if not tid in hours[pid]:
|
|
||||||
hours[pid] = {}
|
|
||||||
hours[pid][tid] = secs
|
|
||||||
c.close()
|
c.close()
|
||||||
self.conn.commit()
|
self.conn.commit()
|
||||||
return hours
|
return hours
|
||||||
|
Loading…
x
Reference in New Issue
Block a user