Ticket #14754: aggregates_relabel_aliases.diff

File aggregates_relabel_aliases.diff, 723 bytes (added by master, 14 years ago)
  • django/db/models/sql/expressions.py

     
    1919
    2020    def relabel_aliases(self, change_map):
    2121        for node, col in self.cols.items():
    22             self.cols[node] = (change_map.get(col[0], col[0]), col[1])
     22            if hasattr(col, 'relabel_aliases'):
     23                col.relabel_aliases(change_map)
     24            else:
     25                self.cols[node] = (change_map.get(col[0], col[0]), col[1])
    2326
    2427    #####################################################
    2528    # Vistor methods for initial expression preparation #
Back to Top