Ticket #1685: query.py.patch

File query.py.patch, 813 bytes (added by feiyu.xie@…, 9 years ago)
  • C:/Dev/django_src_mr/django/db/models/query.py

     
    427427                else:
    428428                    # Use the database table as a column prefix if it wasn't given,
    429429                    # and if the requested column isn't a custom SELECT.
    430                     if "." not in col_name and col_name not in [k[0] for k in (self._select or ())]:
     430                    if "." not in col_name and col_name not in [k for k in (self._select or ())]:
    431431                        table_prefix = backend.quote_name(opts.db_table) + '.'
    432432                    else:
    433433                        table_prefix = ''
Back to Top