mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +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.
|
||||
"""
|
||||
|
||||
from django import urls
|
||||
from django.conf import settings
|
||||
|
||||
from django.test import TestCase
|
||||
from django.urls import reverse
|
||||
|
||||
@ -110,9 +107,13 @@ class URLTest(TestCase):
|
||||
|
||||
url, pk = url_pair
|
||||
|
||||
# TODO: Handle reverse lookup of admin URLs!
|
||||
if url.startswith("admin:"):
|
||||
return
|
||||
|
||||
if pk:
|
||||
# We will assume that there is at least one item in the database
|
||||
reverse(url, kwargs={pk: 1})
|
||||
reverse(url, kwargs={"pk": 1})
|
||||
else:
|
||||
reverse(url)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user