This commit is contained in:
j 2025-02-23 14:23:14 -05:00
commit 09da46bba3
2 changed files with 3 additions and 2 deletions

View file

@ -336,5 +336,6 @@ class Week(models.Model):
colors.append(f'hsl({color}, 50%, 15%, 0.8)')
if len(colors) == 1:
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 ''

View file

@ -23,7 +23,7 @@ def get_auth(headers):
def send_week(monday):
from . import views
date = datetime.strptime(date, '%Y-%m-%d')
date = datetime.strptime(monday, '%Y-%m-%d')
monday = views.get_monday(date)
year, month, day = monday.split('-')
body = views.week(year, month, day)