From fcc1e9fe8f0dc3f8b7e6a0a0d6b6ff7b785da7c7 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sat, 30 Oct 2021 01:00:37 +1100 Subject: [PATCH] Fixes --- InvenTree/InvenTree/test_urls.py | 2 +- InvenTree/templates/js/dynamic/nav.js | 2 +- InvenTree/templates/js/translated/tables.js | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/InvenTree/InvenTree/test_urls.py b/InvenTree/InvenTree/test_urls.py index 042f43b6eb..25822b74f4 100644 --- a/InvenTree/InvenTree/test_urls.py +++ b/InvenTree/InvenTree/test_urls.py @@ -115,7 +115,7 @@ class URLTest(TestCase): if url.startswith("account_"): return - if pk: + if pk and pk not in ['as']: # We will assume that there is at least one item in the database reverse(url, kwargs={"pk": 1}) else: diff --git a/InvenTree/templates/js/dynamic/nav.js b/InvenTree/templates/js/dynamic/nav.js index 043b889da1..b99a3bb6bd 100644 --- a/InvenTree/templates/js/dynamic/nav.js +++ b/InvenTree/templates/js/dynamic/nav.js @@ -151,7 +151,7 @@ function enableSidebar(label, options={}) { */ function setSidebarState(label, state) { - if (state == "collapsed") { + if (state == 'collapsed') { $('.sidebar-item-text').animate({ 'opacity': 0.0, 'font-size': '0%', diff --git a/InvenTree/templates/js/translated/tables.js b/InvenTree/templates/js/translated/tables.js index fed7a5d980..f090e2101a 100644 --- a/InvenTree/templates/js/translated/tables.js +++ b/InvenTree/templates/js/translated/tables.js @@ -214,6 +214,8 @@ $.fn.inventreeTable = function(options) { options.pageList = [25, 50, 100, 250, 'all']; options.totalField = 'count'; options.dataField = 'results'; + } else { + options.pagination = false; } // Extract query params