From 3d11f604a999f30b27ed6b42991ba83f316da1f5 Mon Sep 17 00:00:00 2001 From: Chris Church Date: Mon, 18 Nov 2013 17:16:06 -0500 Subject: [PATCH] AC-647 Move django.db.models.Model import to (hopefully) prevent traceback. --- awx/main/utils.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/awx/main/utils.py b/awx/main/utils.py index 7665508b27..32fdae578d 100644 --- a/awx/main/utils.py +++ b/awx/main/utils.py @@ -10,9 +10,6 @@ import subprocess import sys import urlparse -# Django -from django.db.models import Model - # Django REST Framework from rest_framework.exceptions import ParseError, PermissionDenied @@ -228,6 +225,7 @@ def model_instance_diff(old, new): Calculate the differences between two model instances. One of the instances may be None (i.e., a newly created model or deleted model). This will cause all fields with a value to have changed (from None). """ + from django.db.models import Model if not(old is None or isinstance(old, Model)): raise TypeError('The supplied old instance is not a valid model instance.') if not(new is None or isinstance(new, Model)):