Ticket #11116: 11116_proxy_model_delete2.diff

File 11116_proxy_model_delete2.diff, 673 bytes (added by samueladam, 6 years ago)

Filtering parent.values() for True objects

  • django/db/models/base.py

     
    538538        # traversing to the most remote parent classes -- those with no parents
    539539        # themselves -- and then adding those instances to the collection. That
    540540        # will include all the child instances down to "self".
    541         parent_stack = self._meta.parents.values()
     541        parent_stack = filter(None, self._meta.parents.values())
    542542        while parent_stack:
    543543            link = parent_stack.pop()
    544544            parent_obj = getattr(self, link.name)
Back to Top