mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fixes
This commit is contained in:
parent
29c913b553
commit
2830fc3c7f
@ -107,6 +107,10 @@ class URLTest(TestCase):
|
|||||||
|
|
||||||
url, pk = url_pair
|
url, pk = url_pair
|
||||||
|
|
||||||
|
# Ignore "renaming"
|
||||||
|
if pk.startswith('as '):
|
||||||
|
pk = None
|
||||||
|
|
||||||
# TODO: Handle reverse lookup of admin URLs!
|
# TODO: Handle reverse lookup of admin URLs!
|
||||||
if url.startswith("admin:"):
|
if url.startswith("admin:"):
|
||||||
return
|
return
|
||||||
@ -115,7 +119,7 @@ class URLTest(TestCase):
|
|||||||
if url.startswith("account_"):
|
if url.startswith("account_"):
|
||||||
return
|
return
|
||||||
|
|
||||||
if pk and pk not in ['as']:
|
if pk:
|
||||||
# We will assume that there is at least one item in the database
|
# We will assume that there is at least one item in the database
|
||||||
reverse(url, kwargs={"pk": 1})
|
reverse(url, kwargs={"pk": 1})
|
||||||
else:
|
else:
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
from django.core import exceptions
|
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.conf.urls import url, include
|
from django.conf.urls import url, include
|
||||||
|
Loading…
Reference in New Issue
Block a user