X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/48625c4ed3b93daecc8df786f6fdc45a2477122e..54cbe1753f95bb2dd3441ba5966c32ea63ffcbad:/apps/catalogue/views.py diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index d07303f4..94710cab 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -21,7 +21,7 @@ from django.utils.translation import ugettext_lazy as _ from django.views.decorators.http import require_POST from django.template import RequestContext -from apiclient import NotAuthorizedError +from apiclient import NotAuthorizedError, ApiError from catalogue import forms from catalogue import helpers from catalogue.helpers import active_tab, ajax @@ -485,7 +485,7 @@ def publish(request, slug): book.publish(request.user) except NotAuthorizedError: return http.HttpResponseRedirect(reverse('apiclient_oauth')) - except BaseException, e: + except ApiError, e: return http.HttpResponse(e) else: return http.HttpResponseRedirect(book.get_absolute_url())