mirror of
https://github.com/ansible/awx.git
synced 2026-07-02 20:08:02 -02:30
Fix Django 3.1 deprecation removal problems
- FieldDoesNotExist now has to be imported from django.core.exceptions - Django docs specifically say not to import django.conf.global_settings, which now has the side-effect of triggering one of the check errors
This commit is contained in:
@@ -2,7 +2,11 @@
|
||||
|
||||
import pytest
|
||||
|
||||
# Django
|
||||
from django.core.exceptions import FieldDoesNotExist
|
||||
|
||||
from rest_framework.exceptions import PermissionDenied, ParseError
|
||||
|
||||
from awx.api.filters import FieldLookupBackend, OrderByBackend, get_field_from_path
|
||||
from awx.main.models import (
|
||||
AdHocCommand,
|
||||
@@ -22,9 +26,6 @@ from awx.main.models import (
|
||||
from awx.main.models.oauth import OAuth2Application
|
||||
from awx.main.models.jobs import JobOptions
|
||||
|
||||
# Django
|
||||
from django.db.models.fields import FieldDoesNotExist
|
||||
|
||||
|
||||
def test_related():
|
||||
field_lookup = FieldLookupBackend()
|
||||
|
||||
Reference in New Issue
Block a user