Less indentation

merge-requests/30/head
Bob Mottram 2024-07-16 10:59:06 +01:00
parent 0a34a1d00f
commit 47addccfa2
1 changed files with 50 additions and 49 deletions

View File

@ -563,8 +563,11 @@ def html_calendar(person_cache: {}, translate: {},
continue
calendar_str += ' <tr>\n'
for day_number in range(1, 8):
if (week_of_month > 1 and day_of_month < days_in_month) or \
(week_of_month == 1 and day_number >= dow):
if not ((week_of_month > 1 and day_of_month < days_in_month) or
(week_of_month == 1 and day_number >= dow)):
calendar_str += ' <td class="calendar__day__cell"></td>\n'
continue
day_of_month += 1
is_today = False
@ -611,8 +614,6 @@ def html_calendar(person_cache: {}, translate: {},
calendar_str += \
' <td class="calendar__day__cell" ' + \
'data-today="">' + str(day_of_month) + '</td>\n'
else:
calendar_str += ' <td class="calendar__day__cell"></td>\n'
calendar_str += ' </tr>\n'
calendar_str += '</tbody>\n'