fixed heatmap
This commit is contained in:
parent
88fc1ef573
commit
273eca9da2
@ -81,15 +81,16 @@ class User(UserMixin):
|
|||||||
weekday = datetime.today().weekday()
|
weekday = datetime.today().weekday()
|
||||||
heatmap = [100]
|
heatmap = [100]
|
||||||
|
|
||||||
|
# 0, 1, 2, 3, 4, 5, 6
|
||||||
# append the heatmap values of the current week
|
# append the heatmap values of the current week
|
||||||
for day in range(0, weekday):
|
for day in range(0, 6-weekday):
|
||||||
heatmap.append(0)
|
heatmap.append(0)
|
||||||
|
|
||||||
for day in range (0, 28-weekday):
|
for day in range (0, 28-(6-weekday)):
|
||||||
value = get_heatmap_value(self.id, day)
|
value = get_heatmap_value(self.id, day)
|
||||||
heatmap.append(value)
|
heatmap.append(value)
|
||||||
heatmap.reverse()
|
heatmap.reverse()
|
||||||
day = 27-weekday
|
day = 27-(6-weekday)
|
||||||
return heatmap, day
|
return heatmap, day
|
||||||
|
|
||||||
def accept_List(self, HabitList_id):
|
def accept_List(self, HabitList_id):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user