diff --git a/InvenTree/InvenTree/test_urls.py b/InvenTree/InvenTree/test_urls.py index 25822b74f4..457358ce2b 100644 --- a/InvenTree/InvenTree/test_urls.py +++ b/InvenTree/InvenTree/test_urls.py @@ -107,6 +107,10 @@ class URLTest(TestCase): url, pk = url_pair + # Ignore "renaming" + if pk.startswith('as '): + pk = None + # TODO: Handle reverse lookup of admin URLs! if url.startswith("admin:"): return @@ -115,7 +119,7 @@ class URLTest(TestCase): if url.startswith("account_"): return - if pk and pk not in ['as']: + if pk: # We will assume that there is at least one item in the database reverse(url, kwargs={"pk": 1}) else: diff --git a/InvenTree/report/api.py b/InvenTree/report/api.py index cfb742e3eb..36a99079ad 100644 --- a/InvenTree/report/api.py +++ b/InvenTree/report/api.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals -from django.core import exceptions from django.utils.translation import ugettext_lazy as _ from django.conf.urls import url, include