2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-18 19:17:15 +00:00

rearranged QM code, added red triangle for open QMs

This commit is contained in:
2025-08-26 22:52:13 +01:00
parent 0cf76e8c6b
commit afe9190c97
5 changed files with 56 additions and 44 deletions

View File

@@ -133,6 +133,13 @@ class Cave(TroggleModel):
def __str__(self, sep=": "):
return str(self.slug())
def any_qm_open(self):
qm_count = QM.objects.filter(cave=self, ticked=False).count()
if qm_count >= 1:
return True
else:
return False
def get_open_QMs(self):
"""Searches for all QMs that reference this cave."""
# qms = self.qm_set.all().order_by('expoyear', 'block__date')