Merge branch 'master' into relaunch_ry

Conflicts:
	frontend/views.py
pull/1/head
Raymond Yee 2012-09-11 10:42:49 -07:00
commit 5636637266
1 changed files with 5 additions and 5 deletions

View File

@ -148,7 +148,7 @@ def work(request, work_id, action='display'):
context = {}
campaign = work.last_campaign()
if campaign and campaign.edition:
if campaign and campaign.edition and not request.user.is_staff:
editions = [campaign.edition]
else:
editions = work.editions.all().order_by('-publication_date')
@ -160,9 +160,9 @@ def work(request, work_id, action='display'):
countdown = ""
try:
assert not (work.last_campaign_status() == 'ACTIVE' and work.first_ebook())
assert not (work.last_campaign_status() == 'ACTIVE' and work.first_ebook())
except:
logger.warning("Campaign running for %s when ebooks are already available: why?" % work.title )
logger.warning("Campaign running for %s when ebooks are already available: why?" % work.title )
if work.last_campaign_status() == 'ACTIVE':
from math import ceil