1
0
Fork 0
This commit is contained in:
Matt Lehrer 2023-11-30 11:12:42 +01:00
parent f4da9fbf34
commit 31a78a5c9e
2 changed files with 21 additions and 9 deletions

View file

@ -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}")