fix week
This commit is contained in:
parent
6faa6f502b
commit
09da46bba3
2 changed files with 3 additions and 2 deletions
|
|
@ -336,5 +336,6 @@ class Week(models.Model):
|
||||||
colors.append(f'hsl({color}, 50%, 15%, 0.8)')
|
colors.append(f'hsl({color}, 50%, 15%, 0.8)')
|
||||||
if len(colors) == 1:
|
if len(colors) == 1:
|
||||||
colors.append(colors[0].replace('80%', '50%'))
|
colors.append(colors[0].replace('80%', '50%'))
|
||||||
return 'linear-gradient(to bottom, %s)' % ', '.join(colors)
|
if colors:
|
||||||
|
return 'linear-gradient(to bottom, %s)' % ', '.join(colors)
|
||||||
return ''
|
return ''
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ def get_auth(headers):
|
||||||
|
|
||||||
def send_week(monday):
|
def send_week(monday):
|
||||||
from . import views
|
from . import views
|
||||||
date = datetime.strptime(date, '%Y-%m-%d')
|
date = datetime.strptime(monday, '%Y-%m-%d')
|
||||||
monday = views.get_monday(date)
|
monday = views.get_monday(date)
|
||||||
year, month, day = monday.split('-')
|
year, month, day = monday.split('-')
|
||||||
body = views.week(year, month, day)
|
body = views.week(year, month, day)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue