From 562c75880b83f2035fbe47d4dc06200bc92425ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20S=C3=A1nchez=20Moreno?= Date: Wed, 13 Dec 2017 10:25:10 +0100 Subject: [PATCH] Raise error en slice --- sqlquerybuilder/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sqlquerybuilder/__init__.py b/sqlquerybuilder/__init__.py index 6a6b618..a0faa09 100644 --- a/sqlquerybuilder/__init__.py +++ b/sqlquerybuilder/__init__.py @@ -8,7 +8,7 @@ PYTHON3 = True if sys.version_info[0] < 3: PYTHON3 = False -VERSION = "0.0.14" +VERSION = "0.0.15" def is_map(obj): @@ -308,6 +308,9 @@ class SQLQuery(object): return clone def __getitem__(self, slice): + if isinstance(slice, str): + raise IndexError + clone = self._clone() clone._limits = slice return clone