diff options
author | Alban Gruin | 2017-01-28 12:38:46 +0100 |
---|---|---|
committer | Alban Gruin | 2017-01-28 12:38:46 +0100 |
commit | c4049ef83e7e77bc7d4a9ab5795ce746eb8e8459 (patch) | |
tree | b38a5fe82c8a7ae51d0fffb151144ae284b96c28 /db.py | |
parent | ad5bbfe24c8d00d3bc4b2ae96cb583c141ae27dd (diff) |
Réimplémentation du clonage de GroupedQuery
Diffstat (limited to 'db.py')
-rw-r--r-- | db.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -23,6 +23,11 @@ class GroupedQuery(Query): super(GroupedQuery, self).__init__(model, where) self.real_group_by = [] + def clone(self, klass=None, memo=None, **kwargs): + obj = super(GroupedQuery, self).clone(klass, memo, **kwargs) + obj.real_group_by = self.real_group_by[:] + return obj + def add_grouping(self, *grouping): self.real_group_by.extend(grouping) |