mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-02 13:28:49 +00:00
PEP fixes
This commit is contained in:
parent
2d6a78ffb8
commit
8cb336f581
@ -2,9 +2,6 @@
|
|||||||
Validate that all URLs specified in template files are correct.
|
Validate that all URLs specified in template files are correct.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from django import urls
|
|
||||||
from django.conf import settings
|
|
||||||
|
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
|
|
||||||
@ -110,9 +107,13 @@ class URLTest(TestCase):
|
|||||||
|
|
||||||
url, pk = url_pair
|
url, pk = url_pair
|
||||||
|
|
||||||
|
# TODO: Handle reverse lookup of admin URLs!
|
||||||
|
if url.startswith("admin:"):
|
||||||
|
return
|
||||||
|
|
||||||
if pk:
|
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:
|
||||||
reverse(url)
|
reverse(url)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user