Skip to content
Browse files

BK-78 Publish process can break if Book license is not set.

  • Loading branch information...
1 parent 86d9422 commit 3fc38a31e74b1560df47abf632038532f1f8cc0a @aerkalov aerkalov committed Feb 15, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/booki/channels/editor.py
View
7 lib/booki/channels/editor.py
@@ -2975,12 +2975,17 @@ def remote_publish_book2(request, message, bookid, version):
'GPL': 'GPL'
}
+ licenseText = 'CC-BY'
+
+ if book.license:
+ licenseText = licenses.get(book.license.abbrevation, 'GPL')
+
publishMode = publishOptions[message.get("publish_mode", "epub")]
destination = "nowhere"
args = {'book': book.url_title.encode('utf8'),
- 'license': licenses.get(book.license.abbrevation, 'GPL'),
+ 'license': licenseText,
'project': 'export',
'mode': publishMode,
'server': THIS_BOOKI_SERVER,

0 comments on commit 3fc38a3

Please sign in to comment.
Something went wrong with that request. Please try again.