Ticket #7312: complex_filter_q.diff

File complex_filter_q.diff, 617 bytes (added by Johannes Dollinger, 16 years ago)
  • django/db/models/query.py

     
    398398        and usually it will be more natural to use other methods.
    399399        """
    400400        if isinstance(filter_obj, Q) or hasattr(filter_obj, 'add_to_query'):
    401             return self._filter_or_exclude(None, filter_obj)
     401            clone = self._clone()
     402            clone.query.add_q(filter_obj)
     403            return clone
    402404        else:
    403405            return self._filter_or_exclude(None, **filter_obj)
    404406
Back to Top