Merge branch 'master' of github.com:Gluejar/regluit

pull/1/head
Raymond Yee 2012-01-09 12:47:51 -05:00
commit a4957a5bf6
1 changed files with 4 additions and 1 deletions

View File

@ -81,7 +81,10 @@ def work(request, work_id, action='display'):
work = get_object_or_404(models.Work, id=work_id)
editions = work.editions.all().order_by('-publication_date')
campaign = work.last_campaign()
try:
pledged = campaign.transactions().filter(user=request.user, status="ACTIVE")
except:
pledged = None
try:
pubdate = work.editions.all()[0].publication_date[:4]
except IndexError: