Changed query param from '1' to 'True'

This commit is contained in:
Oliver Walters 2019-04-15 22:36:50 +10:00
parent a5e3af97ed
commit 7e78f0aa67
2 changed files with 2 additions and 2 deletions

View File

@ -67,7 +67,7 @@
$("#edit-bom").click(function () {
location.href = "{% url 'part-bom' part.id %}?edit=1";
location.href = "{% url 'part-bom' part.id %}?edit=True";
});

View File

@ -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)) == '1':
if str(self.request.GET.get('edit', None)):
context['editing_enabled'] = 1
else:
context['editing_enabled'] = 0