make adding editions easier

pull/1/head
eric 2016-08-16 11:04:37 -04:00
parent b3cefc2d3c
commit 8f71b24b1b
1 changed files with 4 additions and 0 deletions

View File

@ -524,6 +524,10 @@ def new_edition(request, work_id, edition_id, by=None):
edition = models.Edition()
if work:
edition.work = work
edition.publication_date = work.earliest_publication_date
edition.new_authors = []
for relator in work.relators():
edition.new_authors.append((relator.author.name, relator.relation.code))
initial = {
'language': language,