linted
This commit is contained in:
parent
f4da9fbf34
commit
31a78a5c9e
2 changed files with 21 additions and 9 deletions
|
@ -107,9 +107,9 @@ def switch_edition(request):
|
|||
book__parent_work=new_edition.parent_work, user=request.user
|
||||
)
|
||||
for review in reviews.all():
|
||||
# because ratings are a subclass of reviews,
|
||||
# because ratings are a subclass of reviews,
|
||||
# this will pick up both ratings and reviews
|
||||
review.book = new_edition
|
||||
review.save()
|
||||
review.save()
|
||||
|
||||
return redirect(f"/book/{new_edition.id}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue