Ticket #14325: fix_genericforeignkey_comparison.diff
File fix_genericforeignkey_comparison.diff, 725 bytes (added by , 14 years ago) |
---|
-
django/contrib/contenttypes/generic.py
old new 49 49 # Convenience function using get_model avoids a circular import when 50 50 # using this model 51 51 ContentType = get_model("contenttypes", "contenttype") 52 if obj :52 if obj is not None: 53 53 return ContentType.objects.db_manager(obj._state.db).get_for_model(obj) 54 elif id :54 elif id is not None: 55 55 return ContentType.objects.db_manager(using).get_for_id(id) 56 56 else: 57 57 # This should never happen. I love comments like this, don't you?