mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-14 00:27:07 +00:00
fixing Sunday display on calendar
This commit is contained in:
@@ -148,10 +148,11 @@ class SurvexBlock(models.Model):
|
||||
def DayIndex(self):
|
||||
"""This is used to set different colours for the different trips on
|
||||
the calendar view of the expedition"""
|
||||
mx = 10
|
||||
index = list(SurvexBlock.objects.filter(date=self.date)).index(self)
|
||||
if index not in range(0,10):
|
||||
print(f"Unexpected SurvexBlock DayIndex '{index}' {self}")
|
||||
index = 10
|
||||
if index not in range(0, mx):
|
||||
print(f"DayIndex: More than {mx-1} SurvexBlock items on one day '{index}' {self}")
|
||||
index = 0
|
||||
#return list(self.survexblock_set.all()).index(self)
|
||||
return index
|
||||
|
||||
|
||||
Reference in New Issue
Block a user