From 4d6ac9d4196e0abab277706b58e63b56f2fe0ba9 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Sun, 9 Aug 2015 02:23:16 +0200 Subject: [PATCH] TaskQuerySet: Always require backend set properly --- tasklib/task.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasklib/task.py b/tasklib/task.py index b9cc447..c821fcc 100644 --- a/tasklib/task.py +++ b/tasklib/task.py @@ -425,7 +425,7 @@ class TaskQuerySet(object): Represents a lazy lookup for a task objects. """ - def __init__(self, backend=None, filter_obj=None): + def __init__(self, backend, filter_obj=None): self.backend = backend self._result_cache = None self.filter_obj = filter_obj or self.backend.filter_class(backend) @@ -434,7 +434,7 @@ class TaskQuerySet(object): """ Deep copy of a QuerySet doesn't populate the cache """ - obj = self.__class__() + obj = self.__class__(backend=self.backend) for k, v in self.__dict__.items(): if k in ('_iter', '_result_cache'): obj.__dict__[k] = None -- 2.39.2