diff --git a/bookwyrm/views/preferences/export.py b/bookwyrm/views/preferences/export.py index f54d97ccb..c691e2f50 100644 --- a/bookwyrm/views/preferences/export.py +++ b/bookwyrm/views/preferences/export.py @@ -54,6 +54,7 @@ class Export(View): fields = ( ["title", "author_text"] + deduplication_fields + + ["start_date", "finish_date", "stopped_date"] + ["rating", "review_name", "review_cw", "review_content"] ) writer.writerow(fields) @@ -70,6 +71,18 @@ class Export(View): book.rating = review_rating.rating if review_rating else None + readthrough = ( + models.ReadThrough.objects.filter( + user=request.user, book=book + ) + .order_by("-finish_date") + .first() + ) + if readthrough: + book.start_date = readthrough.start_date + book.finish_date = readthrough.finish_date + book.stopped_date = readthrough.stopped_date + review = ( models.Review.objects.filter( user=request.user, book=book, content__isnull=False