1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

[1.8.x] Fixed #24744 - Fixed relabeled_clone for the Transform

Backport of 08232ef84d from master
This commit is contained in:
Andriy Sokolovskiy
2015-06-04 15:51:07 +01:00
committed by Tim Graham
parent f4c09d3e42
commit b4b13759f8
3 changed files with 23 additions and 1 deletions

View File

@@ -72,8 +72,13 @@ class Transform(RegisterLookupMixin):
def output_field(self):
return self.lhs.output_field
def copy(self):
return copy(self)
def relabeled_clone(self, relabels):
return self.__class__(self.lhs.relabeled_clone(relabels))
copy = self.copy()
copy.lhs = self.lhs.relabeled_clone(relabels)
return copy
def get_group_by_cols(self):
return self.lhs.get_group_by_cols()