From 36a01feacb6dd0da10fab3c6500eadf91c2336cd Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Tue, 14 Aug 2012 14:07:02 +0200 Subject: [PATCH] minor fixes --- apps/apiclient/__init__.py | 2 +- apps/catalogue/models/book.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/apiclient/__init__.py b/apps/apiclient/__init__.py index d44e016d..e61b1bcb 100644 --- a/apps/apiclient/__init__.py +++ b/apps/apiclient/__init__.py @@ -46,5 +46,5 @@ def api_call(user, path, data=None): elif status == '401': raise ApiError('User not authorized for publishing.') else: - raise ApiError("WL API call error") + raise ApiError("WL API call error [code %s]" % status") diff --git a/apps/catalogue/models/book.py b/apps/catalogue/models/book.py index ca389987..a8a3f20c 100755 --- a/apps/catalogue/models/book.py +++ b/apps/catalogue/models/book.py @@ -40,7 +40,8 @@ class Book(models.Model): _new_publishable = models.NullBooleanField(editable=False) _published = models.NullBooleanField(editable=False) _on_track = models.IntegerField(null=True, blank=True, db_index=True, editable=False) - dc_cover_image = models.ForeignKey(Image, blank=True, null=True, db_index=True, on_delete=models.SET_NULL) + dc_cover_image = models.ForeignKey(Image, blank=True, null=True, + db_index=True, on_delete=models.SET_NULL, editable=False) dc_slug = models.CharField(max_length=128, null=True, blank=True, editable=False, db_index=True) -- 2.20.1