From c45de02b8ae2f976157e59ea36c6b39cd2bc0a0f Mon Sep 17 00:00:00 2001 From: Alban Gruin Date: Sat, 28 Jan 2017 12:38:46 +0100 Subject: Réimplémentation du clonage de GroupedQuery --- db.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'db.py') diff --git a/db.py b/db.py index e75adca..2d4d320 100644 --- a/db.py +++ b/db.py @@ -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) -- cgit v1.2.1