From: Radek Czajka Date: Tue, 14 Aug 2012 12:07:02 +0000 (+0200) Subject: minor fixes X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/36a01feacb6dd0da10fab3c6500eadf91c2336cd?hp=0f7ebe49c20394d80afb129b29e4afa411347441 minor fixes --- 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)