Skip to content

Commit eec3f78

Browse files
committed
Fixed errant self.log.
Thanks to terryh for the report!
1 parent 967dabc commit eec3f78

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

haystack/query.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import logging
12
import operator
23
import warnings
34
from haystack import connections, connection_router
@@ -29,6 +30,7 @@ def __init__(self, using=None, query=None):
2930
self._cache_full = False
3031
self._load_all = False
3132
self._ignored_result_count = 0
33+
self.log = logging.getLogger('haystack')
3234

3335
def _determine_backend(self):
3436
# A backend has been manually selected. Use it instead.
@@ -58,13 +60,15 @@ def __getstate__(self):
5860
len(self)
5961
obj_dict = self.__dict__.copy()
6062
obj_dict['_iter'] = None
63+
obj_dict['log'] = None
6164
return obj_dict
6265

6366
def __setstate__(self, data_dict):
6467
"""
6568
For unpickling.
6669
"""
6770
self.__dict__ = data_dict
71+
self.log = logging.getLogger('haystack')
6872

6973
def __repr__(self):
7074
data = list(self[:REPR_OUTPUT_SIZE])

0 commit comments

Comments
 (0)