From c39bbef47c040f164b60bf871a9247a0893aa24a Mon Sep 17 00:00:00 2001 From: Commander1024 Date: Wed, 12 Aug 2020 18:13:41 +0200 Subject: [PATCH] Removed german string, reodered comment. --- lostplaces/lostplaces_app/templates/place/place_delete.html | 2 +- lostplaces/lostplaces_app/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lostplaces/lostplaces_app/templates/place/place_delete.html b/lostplaces/lostplaces_app/templates/place/place_delete.html index 027a593..3f06c2f 100644 --- a/lostplaces/lostplaces_app/templates/place/place_delete.html +++ b/lostplaces/lostplaces_app/templates/place/place_delete.html @@ -7,7 +7,7 @@
- Place löschen + Delete place {% csrf_token %}

Are you sure you want to delete "{{place.name}}"?

diff --git a/lostplaces/lostplaces_app/views.py b/lostplaces/lostplaces_app/views.py index 5ee901c..47e25bb 100644 --- a/lostplaces/lostplaces_app/views.py +++ b/lostplaces/lostplaces_app/views.py @@ -107,9 +107,9 @@ class PlaceDeleteView(UserPassesTestMixin, DeleteView): if self.request.user.is_superuser: return True + # Check if currently logged in user was the submitter place_obj = self.get_object() - # Check if currently logged in user was the submitter if self.request.user == place_obj.submitted_by: return True