summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBertrand Bordage <bordage.bertrand@gmail.com>2017-06-03 10:21:25 (GMT)
committerBertrand Bordage <bordage.bertrand@gmail.com>2017-06-03 10:21:25 (GMT)
commitcb877355ac4f2cb60de85a907372f672e31fbb18 (patch)
tree3545a2c7b5a66263c980f83a8470f8271f4da9cf
parent799fbf28e007e14d366762cd8c75b60c14f59f19 (diff)
downloaddjango-cachalot-cb877355ac4f2cb60de85a907372f672e31fbb18.zip
django-cachalot-cb877355ac4f2cb60de85a907372f672e31fbb18.tar.gz
django-cachalot-cb877355ac4f2cb60de85a907372f672e31fbb18.tar.bz2
Adds bytearray to the list of cachable params.
-rw-r--r--cachalot/utils.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/cachalot/utils.py b/cachalot/utils.py
index 716c725..3113c6b 100644
--- a/cachalot/utils.py
+++ b/cachalot/utils.py
@@ -25,7 +25,7 @@ class UncachableQuery(Exception):
TUPLE_OR_LIST = {tuple, list}
CACHABLE_PARAM_TYPES = {
- bool, int, float, Decimal, binary_type, text_type, type(None),
+ bool, int, float, Decimal, bytearray, binary_type, text_type, type(None),
datetime.date, datetime.time, datetime.datetime, datetime.timedelta, UUID,
}
@@ -59,7 +59,6 @@ def check_parameter_types(params):
elif cl is dict:
check_parameter_types(p.items())
else:
- print(params, [text_type(p) for p in params])
raise UncachableQuery