From a55619407bba1440fcf816f90c298eb20d0fb2b4 Mon Sep 17 00:00:00 2001 From: Hanne Moa Date: Wed, 13 Oct 2021 10:55:11 +0200 Subject: [PATCH] Import FieldDoesNotExist from the correct place --- python/nav/django/utils.py | 2 +- python/nav/web/api/v1/views.py | 2 +- python/nav/web/seeddb/utils/list.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/nav/django/utils.py b/python/nav/django/utils.py index 490b778866..25fdbefabb 100644 --- a/python/nav/django/utils.py +++ b/python/nav/django/utils.py @@ -16,7 +16,7 @@ # """Utility methods for django used in NAV""" -from django.db.models.fields import FieldDoesNotExist +from django.core.exceptions import FieldDoesNotExist from django.urls import reverse from django.utils.http import urlencode diff --git a/python/nav/web/api/v1/views.py b/python/nav/web/api/v1/views.py index 17cfdf267d..27b55b5e11 100644 --- a/python/nav/web/api/v1/views.py +++ b/python/nav/web/api/v1/views.py @@ -22,7 +22,7 @@ from django.http import HttpResponse, JsonResponse from django.db.models import Q from django.db.models.fields.related import ManyToOneRel as _RelatedObject -from django.db.models.fields import FieldDoesNotExist +from django.core.exceptions import FieldDoesNotExist import iso8601 from django_filters.rest_framework import DjangoFilterBackend, FilterSet diff --git a/python/nav/web/seeddb/utils/list.py b/python/nav/web/seeddb/utils/list.py index c20c2aa157..dbd474a538 100644 --- a/python/nav/web/seeddb/utils/list.py +++ b/python/nav/web/seeddb/utils/list.py @@ -21,7 +21,7 @@ from django.db.models import Model from django.shortcuts import render -from django.db.models.fields import FieldDoesNotExist +from django.core.exceptions import FieldDoesNotExist from django.urls import reverse from six import iteritems