X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/75957f735219259d3b4bc361f80ccd3d7b92a0e9..e2a460b0a960df9482701ab10ec135a5cc3c69ac:/src/funding/views.py?ds=inline diff --git a/src/funding/views.py b/src/funding/views.py index 91dafc1aa..5d4669e66 100644 --- a/src/funding/views.py +++ b/src/funding/views.py @@ -77,7 +77,11 @@ class OfferDetailView(FormView): def dispatch(self, request, slug=None): if getattr(self, 'object', None) is None: if slug: - self.object = get_object_or_404(Offer.public(), slug=slug) + if request.user.is_staff: + offers = Offer.objects.all() + else: + offers = Offer.public() + self.object = get_object_or_404(offers, slug=slug) else: self.object = Offer.current() if self.object is None: