AC-647 Move django.db.models.Model import to (hopefully) prevent traceback.

This commit is contained in:
Chris Church 2013-11-18 17:16:06 -05:00
parent 1b224f64ac
commit 3d11f604a9

View File

@ -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)):