Commits

and...@69d324d9-c39d-4fdc-8679-7745eae9e2c8  committed 0c5c28d

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

  • Participants
  • Parent commits 9ee859e

Comments (0)

Files changed (1)

File south/modelsparser.py

 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 = field.name
-        if isinstance(field, models.related.RelatedObject):
+        if isinstance(field, (models.related.RelatedObject, generic.GenericRel)):
             continue
         # Now, try to get the defn
         if fieldname in field_defs: