mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Better query param parsing
This commit is contained in:
parent
3d9a1acc2e
commit
ca96c8e22b
@ -94,7 +94,7 @@ class PartDetail(DetailView):
|
|||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
context = super(PartDetail, self).get_context_data(**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
|
context['editing_enabled'] = 1
|
||||||
else:
|
else:
|
||||||
context['editing_enabled'] = 0
|
context['editing_enabled'] = 0
|
||||||
|
Loading…
Reference in New Issue
Block a user