Anonymous committed 0c5c28d

Fix a problem someone had on the mailing list with South picking up on generic relations as real fields.

Comments (0)

Files changed (1)


 import datetime
 from django.db import models
+from django.contrib.contenttypes import generic
 from django.utils.datastructures import SortedDict
 from django.core.exceptions import ImproperlyConfigured
     for field in source:
         # Get its name
         fieldname =
-        if isinstance(field, models.related.RelatedObject):
+        if isinstance(field, (models.related.RelatedObject, generic.GenericRel)):
         # Now, try to get the defn
         if fieldname in field_defs: