mirror of https://gitlab.com/brutaldon/brutaldon
Fix error when *not* canceling a boost or fav
This commit is contained in:
parent
25cbb258c6
commit
99a021b5af
|
@ -204,7 +204,7 @@ def fav(request, id):
|
||||||
mastodon = get_mastodon(request)
|
mastodon = get_mastodon(request)
|
||||||
toot = mastodon.status(id)
|
toot = mastodon.status(id)
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
if not request.POST['cancel']:
|
if not request.POST.get('cancel', None):
|
||||||
if toot.favourited:
|
if toot.favourited:
|
||||||
mastodon.status_unfavourite(id)
|
mastodon.status_unfavourite(id)
|
||||||
else:
|
else:
|
||||||
|
@ -217,7 +217,7 @@ def boost(request, id):
|
||||||
mastodon = get_mastodon(request)
|
mastodon = get_mastodon(request)
|
||||||
toot = mastodon.status(id)
|
toot = mastodon.status(id)
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
if not request.POST['cancel']:
|
if not request.POST.get('cancel', None):
|
||||||
if toot.reblogged:
|
if toot.reblogged:
|
||||||
mastodon.status_unreblog(id)
|
mastodon.status_unreblog(id)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue