Skip to content

Commit

Permalink
BK-78 Publish process can break if Book license is not set.
Browse files Browse the repository at this point in the history
  • Loading branch information
aerkalov committed Feb 15, 2012
1 parent 86d9422 commit 3fc38a3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/booki/channels/editor.py
Expand Up @@ -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,
Expand Down

0 comments on commit 3fc38a3

Please sign in to comment.