Skip to content

zrank and zscore fail with integer members #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
noise opened this issue Mar 27, 2014 · 0 comments
Closed

zrank and zscore fail with integer members #49

noise opened this issue Mar 27, 2014 · 0 comments

Comments

@noise
Copy link
Contributor

noise commented Mar 27, 2014

In client.py:zadd(), the member is converted to a string:

        insert_count = lambda member, score: 1 if zset.insert(str(member), float(score)) else 0

but not also done in sortedset.py:zscore() and zrank(), so if you:

zadd(key, 12345, 1.0)
zscore(key, 12345)

it fails to find the member.

noise added a commit to noise/mockredis that referenced this issue Mar 27, 2014
jessemyers added a commit that referenced this issue Mar 30, 2014
fix #49 - convert member to string in zscore and zrank
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant