This commit is contained in:
reverend 2020-12-24 16:43:43 +01:00
parent 61cf148417
commit 4a43a4bf37

View File

@ -128,7 +128,7 @@ class PlaceFavoriteView(IsAuthenticatedMixin, View):
request.user.explorer.favorite_places.add(place) request.user.explorer.favorite_places.add(place)
request.user.explorer.save() request.user.explorer.save()
referer = request.META.get('HTTP_referer') referer = request.META.get('HTTP_REFERER')
if referer is not None: if referer is not None:
return redirect(referer) return redirect(referer)
else: else:
@ -144,7 +144,7 @@ class PlaceUnfavoriteView(IsAuthenticatedMixin, View):
request.user.explorer.favorite_places.remove(place) request.user.explorer.favorite_places.remove(place)
request.user.explorer.save() request.user.explorer.save()
referer = request.META.get('HTTP_referer') referer = request.META.get('HTTP_REFERER')
if referer is not None: if referer is not None:
return redirect(referer) return redirect(referer)
else: else: