Skip to content

Commit b574524

Browse files
committed
Fix wrong resultset indexing use
1 parent 590f150 commit b574524

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
---------
@@ -10,6 +11,7 @@ Bug Fixes
1011
Other
1112
-----
1213
* Fix tests when RF is not maintained if we decomission a node (PYTHON-1017)
14+
* Fix wrong use of ResultSet indexing (PYTHON-1015)
1315

1416
3.15.1
1517
======

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)