diff --git a/django_walletpass/classviews.py b/django_walletpass/classviews.py index da2872b..ffecb2a 100644 --- a/django_walletpass/classviews.py +++ b/django_walletpass/classviews.py @@ -113,7 +113,11 @@ def retrieve(self, request, pass_type_id, serial_number): response['Content-Disposition'] = 'attachment; filename=pass.pkpass' response['Last-Modified'] = http_date(timegm(pass_.updated_at.utctimetuple())) - return ConditionalGetMiddleware(get_response=response)(request) + + def _get_response(request): + return response + + return ConditionalGetMiddleware(get_response=_get_response)(request) # TODO: use ModelViewSet