mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-12 11:16:33 +00:00
Fixes syntax in reading view
This commit is contained in:
parent
a96d027cf3
commit
d510d72b8d
2 changed files with 5 additions and 4 deletions
|
@ -113,6 +113,7 @@ class ReadingViews(TestCase):
|
||||||
{
|
{
|
||||||
"post-status": True,
|
"post-status": True,
|
||||||
"privacy": "followers",
|
"privacy": "followers",
|
||||||
|
"start_date": readthrough.start_date,
|
||||||
"finish_date": timezone.now().isoformat(),
|
"finish_date": timezone.now().isoformat(),
|
||||||
"id": readthrough.id,
|
"id": readthrough.id,
|
||||||
},
|
},
|
||||||
|
|
|
@ -193,11 +193,11 @@ def create_readthrough(request):
|
||||||
"""can't use the form because the dates are too finnicky"""
|
"""can't use the form because the dates are too finnicky"""
|
||||||
book = get_object_or_404(models.Edition, id=request.POST.get("book"))
|
book = get_object_or_404(models.Edition, id=request.POST.get("book"))
|
||||||
|
|
||||||
start_date = (
|
start_date = load_date_in_user_tz_as_utc(
|
||||||
load_date_in_user_tz_as_utc(request.POST.get("start_date"), request.user),
|
request.POST.get("start_date"), request.user
|
||||||
)
|
)
|
||||||
finish_date = (
|
finish_date = load_date_in_user_tz_as_utc(
|
||||||
load_date_in_user_tz_as_utc(request.POST.get("finish_date"), request.user),
|
request.POST.get("finish_date"), request.user
|
||||||
)
|
)
|
||||||
models.ReadThrough.objects.create(
|
models.ReadThrough.objects.create(
|
||||||
user=request.user,
|
user=request.user,
|
||||||
|
|
Loading…
Reference in a new issue