Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit 43530384b7f2a18b44e06e7043b988427b334653 1 parent 3b6f980
@freakboy3742 freakboy3742 authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/db/models/fields/related.py
View
2  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)
Please sign in to comment.
Something went wrong with that request. Please try again.