Ticket #1519: extra-select-list.diff

File extra-select-list.diff, 1.5 KB (added by Antti Kaihola, 19 years ago)

alternate fix to make extra(select=) accept a list of 2-tuples

  • django/db/models/query.py

     
    7272        self._order_by = None        # Ordering, e.g. ('date', '-name'). If None, use model's ordering.
    7373        self._select_related = False # Whether to fill cache for related objects.
    7474        self._distinct = False       # Whether the query should use SELECT DISTINCT.
    75         self._select = {}            # Dictionary of attname -> SQL.
     75        self._select = []            # 2-tuple of (attname, SQL).
    7676        self._where = []             # List of extra WHERE clauses to use.
    7777        self._params = []            # List of params to use for extra WHERE clauses.
    7878        self._tables = []            # List of extra tables to use.
     
    150150        "Performs the SELECT database lookup of this QuerySet."
    151151        # self._select is a dictionary, and dictionaries' key order is
    152152        # undefined, so we convert it to a list of tuples.
    153         extra_select = self._select.items()
     153        extra_select = self._select
Back to Top