Permalink
Browse files

Fixed #19049 -- Corrected dumb logic negation error from earlier patch.

  • Loading branch information...
1 parent 3b6f980 commit 43530384b7f2a18b44e06e7043b988427b334653 @freakboy3742 freakboy3742 committed Oct 3, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/db/models/fields/related.py
@@ -1026,7 +1026,7 @@ def contribute_to_class(self, cls, name):
def contribute_to_related_class(self, cls, related):
# Internal FK's - i.e., those with a related name ending with '+' -
# and swapped models don't get a related descriptor.
- if not self.rel.is_hidden() and related.model._meta.swapped:
+ if not self.rel.is_hidden() and not related.model._meta.swapped:
setattr(cls, related.get_accessor_name(), ForeignRelatedObjectsDescriptor(related))
if self.rel.limit_choices_to:
cls._meta.related_fkey_lookups.append(self.rel.limit_choices_to)

0 comments on commit 4353038

Please sign in to comment.