Skip to content

Commit 48b1228

Browse files
authored
Merge pull request datastax#991 from datastax/python-1015
PYTHON-1015: Fix wrong resultset indexing use
2 parents 25f710c + b574524 commit 48b1228

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CHANGELOG.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
3.15.2
1+
3.16.0
22
======
3+
NOT RELEASED
34

45
Bug Fixes
56
---------
@@ -11,6 +12,7 @@ Bug Fixes
1112
Other
1213
-----
1314
* Fix tests when RF is not maintained if we decomission a node (PYTHON-1017)
15+
* Fix wrong use of ResultSet indexing (PYTHON-1015)
1416

1517
3.15.1
1618
======

cassandra/cqlengine/query.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def check_applied(result):
7676
except Exception:
7777
applied = True # result was not LWT form
7878
if not applied:
79-
raise LWTException(result[0])
79+
raise LWTException(result.one())
8080

8181

8282
class AbstractQueryableColumn(UnicodeMixin):
@@ -841,7 +841,7 @@ def count(self):
841841
query = self._select_query()
842842
query.count = True
843843
result = self._execute(query)
844-
count_row = result[0].popitem()
844+
count_row = result.one().popitem()
845845
self._count = count_row[1]
846846
return self._count
847847

0 commit comments

Comments
 (0)