mirror of
https://github.com/pretix/pretix.git
synced 2026-08-16 11:46:27 +00:00
code style
This commit is contained in:
@@ -82,8 +82,10 @@ 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(): # 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
|
||||
# don't offer items in the selection if they don't allow waitinglists or aren't on sale at all
|
||||
if not item.allow_waitinglist | item.quotas.exists():
|
||||
# except if they are currently set in the waitinglist, this will be then caught on submit in the clean step
|
||||
if not self.instance.item.pk == item.pk:
|
||||
continue
|
||||
|
||||
if len(item.variations.all()) > 0:
|
||||
|
||||
@@ -478,7 +478,7 @@ urlpatterns = [
|
||||
name='event.orders.waitinglist.delete'),
|
||||
re_path(r'^waitinglist/(?P<entry>\d+)/edit$', waitinglist.EntryEdit.as_view(),
|
||||
name='event.orders.waitinglist.edit'),
|
||||
re_path(r'^waitinglist/(?P<entry>\d+)/transfer$', waitinglist.EntryEdit.as_view(), # alias of /edit
|
||||
re_path(r'^waitinglist/(?P<entry>\d+)/transfer$', waitinglist.EntryEdit.as_view(), # alias of /edit
|
||||
name='event.orders.waitinglist.edit'),
|
||||
re_path(r'^checkins/$', checkin.CheckinListView.as_view(), name='event.orders.checkins'),
|
||||
re_path(r'^checkinlists/$', checkin.CheckinListList.as_view(), name='event.orders.checkinlists'),
|
||||
|
||||
@@ -53,9 +53,7 @@ from pretix.base.models import Item, LogEntry, Quota, WaitingListEntry
|
||||
from pretix.base.models.waitinglist import WaitingListException
|
||||
from pretix.base.services.waitinglist import assign_automatically
|
||||
from pretix.base.views.tasks import AsyncAction
|
||||
from pretix.control.forms.waitinglist import (
|
||||
WaitingListEntryEditForm,
|
||||
)
|
||||
from pretix.control.forms.waitinglist import WaitingListEntryEditForm
|
||||
from pretix.control.permissions import EventPermissionRequiredMixin
|
||||
from pretix.control.views import PaginationMixin
|
||||
|
||||
@@ -401,6 +399,7 @@ class EntryDelete(EventPermissionRequiredMixin, CompatDeleteView):
|
||||
'organizer': self.request.event.organizer.slug
|
||||
})
|
||||
|
||||
|
||||
class EntryEdit(EventPermissionRequiredMixin, UpdateView):
|
||||
model = WaitingListEntry
|
||||
template_name = 'pretixcontrol/waitinglist/edit.html'
|
||||
|
||||
Reference in New Issue
Block a user