From ca96c8e22bbb0cc3a5c6f4a85e695371a83aca3a Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Mon, 15 Apr 2019 23:30:17 +1000 Subject: [PATCH] Better query param parsing --- InvenTree/part/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InvenTree/part/views.py b/InvenTree/part/views.py index 8cd48484fd..7147e4282b 100644 --- a/InvenTree/part/views.py +++ b/InvenTree/part/views.py @@ -94,7 +94,7 @@ class PartDetail(DetailView): def get_context_data(self, **kwargs): context = super(PartDetail, self).get_context_data(**kwargs) - if str(self.request.GET.get('edit', None)): + if self.request.GET.get('edit', '').lower() in ['true', 'yes', '1']: context['editing_enabled'] = 1 else: context['editing_enabled'] = 0