fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
don't assume that aktywnosc/opis is non-empty
[redakcja.git]
/
apps
/
catalogue
/
views.py
diff --git
a/apps/catalogue/views.py
b/apps/catalogue/views.py
index
d07303f
..
94710ca
100644
(file)
--- 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 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
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'))
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())
return http.HttpResponse(e)
else:
return http.HttpResponseRedirect(book.get_absolute_url())