Skip to content

Commit 6b2b634

Browse files
committed
[PYTHON-1121] Fix queryset generation for cqlengine Token instances
1 parent 2c8358f commit 6b2b634

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Bug Fixes
66
---------
77
* Connection setup methods prevent using ExecutionProfile in cqlengine (PYTHON-1009)
88
* Driver deadlock if all connections dropped by heartbeat whilst request in flight and request times out (PYTHON-1044)
9+
* Exception when use pk__token__gt filter In python 3.7 (PYTHON-1121)
910

1011
3.19.0
1112
======

cassandra/cqlengine/columns.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,7 @@ class _PartitionKeysToken(Column):
10711071
"""
10721072

10731073
def __init__(self, model):
1074-
self.partition_columns = model._partition_keys.values()
1074+
self.partition_columns = list(model._partition_keys.values())
10751075
super(_PartitionKeysToken, self).__init__(partition_key=True)
10761076

10771077
@property

tests/integration/cqlengine/query/test_queryoperators.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ def test_token_function(self):
9494
# pk__token equality
9595
r = TokenTestModel.objects(pk__token=functions.Token(last_token))
9696
self.assertEqual(len(r), 1)
97+
r.all() # Attempt to obtain queryset for results. This has thrown an exception in the past
9798

9899
def test_compound_pk_token_function(self):
99100

0 commit comments

Comments
 (0)