add tests

This commit is contained in:
Lukas Bockstaller
2025-12-18 12:34:58 +01:00
parent 730a60ba45
commit aa680391ec
2 changed files with 122 additions and 28 deletions
+3 -2
View File
@@ -82,8 +82,9 @@ class WaitingListEntryEditForm(I18nModelForm):
items = self.event.items.prefetch_related('variations').prefetch_related('quotas')
for item in items:
if not item.allow_waitinglist | item.quotas.exists():
continue
if not item.allow_waitinglist | item.quotas.exists(): # don't offer items in the selection if they don't allow waitinglists or aren't on sale at all
if not self.instance.item.pk == item.pk: # except if they are currently set in the waitinglist, this will be then caught on submit in the clean step
continue
if len(item.variations.all()) > 0:
for v in item.variations.all():