Merge pull request #3401 from dato/comment_progress_keep_start_date
Fix reading progress `start_date` bug
This commit is contained in:
commit
95c2798fc7
2 changed files with 38 additions and 6 deletions
|
@ -201,12 +201,11 @@ def edit_readthrough(request):
|
|||
# TODO: remove this, it duplicates the code in the ReadThrough view
|
||||
readthrough = get_object_or_404(models.ReadThrough, id=request.POST.get("id"))
|
||||
|
||||
readthrough.start_date = load_date_in_user_tz_as_utc(
|
||||
request.POST.get("start_date"), request.user
|
||||
)
|
||||
readthrough.finish_date = load_date_in_user_tz_as_utc(
|
||||
request.POST.get("finish_date"), request.user
|
||||
)
|
||||
if start_date := request.POST.get("start_date"):
|
||||
readthrough.start_date = load_date_in_user_tz_as_utc(start_date, request.user)
|
||||
|
||||
if finish_date := request.POST.get("finish_date"):
|
||||
readthrough.finish_date = load_date_in_user_tz_as_utc(finish_date, request.user)
|
||||
|
||||
progress = request.POST.get("progress")
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue