Ticket #7498: dj-foreignkey-typecheck-fix.patch
File dj-foreignkey-typecheck-fix.patch, 648 bytes (added by , 16 years ago) |
---|
-
base.py
216 210 val = None 217 211 else: 218 212 try: 213 if not isinstance(rel_obj, field.rel.to): 214 raise AttributeError 219 215 val = getattr(rel_obj, field.rel.get_related_field().attname) 220 216 except AttributeError: 221 217 raise TypeError("Invalid value: %r should be a %s instance, not a %s" %