Merge pull request #452 from Gluejar/tweak_select_edition

2 management tweaks
pull/1/head
Raymond Yee 2015-01-29 13:33:38 -08:00
commit 67fc56733f
1 changed files with 2 additions and 1 deletions

View File

@ -346,6 +346,7 @@ def work(request, work_id, action='display'):
selected_id=request.POST['select_edition'] selected_id=request.POST['select_edition']
try: try:
work.selected_edition= work.editions.get(id=selected_id) work.selected_edition= work.editions.get(id=selected_id)
work.title=work.selected_edition.title
work.save() work.save()
alert = alert + 'edition selected' alert = alert + 'edition selected'
except models.Edition.DoesNotExist: except models.Edition.DoesNotExist:
@ -2925,7 +2926,7 @@ def feature(request, work_id):
if work.first_ebook(): if work.first_ebook():
work.featured = now() work.featured = now()
work.save() work.save()
return home(request, landing=True) return HttpResponseRedirect(reverse('landing', args=[] ))
else: else:
return HttpResponse('can\'t feature an work without an ebook') return HttpResponse('can\'t feature an work without an ebook')