mirror of
https://github.com/pretix/pretix.git
synced 2026-05-08 15:44:02 +00:00
Install django-scopes
This commit is contained in:
@@ -2,6 +2,7 @@ import string
|
||||
import uuid
|
||||
from collections import OrderedDict
|
||||
from datetime import datetime, time, timedelta
|
||||
from django_scopes import ScopedManager
|
||||
from operator import attrgetter
|
||||
|
||||
import pytz
|
||||
@@ -336,6 +337,8 @@ class Event(EventMixin, LoggedModel):
|
||||
default=False
|
||||
)
|
||||
|
||||
objects = ScopedManager(organizer='organizer')
|
||||
|
||||
class Meta:
|
||||
verbose_name = _("Event")
|
||||
verbose_name_plural = _("Events")
|
||||
@@ -875,6 +878,8 @@ class SubEvent(EventMixin, LoggedModel):
|
||||
items = models.ManyToManyField('Item', through='SubEventItem')
|
||||
variations = models.ManyToManyField('ItemVariation', through='SubEventItemVariation')
|
||||
|
||||
objects = ScopedManager(organizer='event__organizer')
|
||||
|
||||
class Meta:
|
||||
verbose_name = _("Date in event series")
|
||||
verbose_name_plural = _("Dates in event series")
|
||||
|
||||
Reference in New Issue
Block a user