question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

django-vote does not support down voting as README states

See original GitHub issue

I have implemented django-vote in one of my projects and I found an odd behaviour where a user could perform a ‘downvote’ to the same object over and over, and obj.votes.exists(user_id) would return false because the ‘downvote’ is not committed to the vote object but nevertheless is counted in num_vote_down.

If 5 users decided to ‘downvote’ an object, we will have num_vote_down equals 5, but the user_ids would still return an empty queryset and the exists method would return false for each users. This happens only regarding the down method.

Am I missing something? Thank you for your help!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
shellflycommented, Aug 4, 2021

The down feature was added later, the document doesn’t mention there is a new action parameter for both exists and the user_ids function, you can use the second parameter to get your expected result.

0reactions
MurphyAdamcommented, Aug 5, 2021

Alright cool! Thanks for the help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · shellfly/django-vote - GitHub
Contribute to shellfly/django-vote development by creating an account on GitHub. ... django-vote does not support down voting as README states.
Read more >
Django-vote implementation for comment up/down voting ...
I'm not sure what the following line does, although I see what you want to accomplish: comment.votes.up(user_id= voting_user).
Read more >
Readme markdown not rendering in Xcode - Apple Developer
In Xcode 11.1, I created a 'README.md' markdown file, but it always renders as its raw text ... Toggling that on/off though has...
Read more >
Markdown down does not render correctly in Azure Artifacts
0Votes. Markdown down does not render correctly in Azure Artifacts ... This issue is read only, because it has been in the Closed...
Read more >
Markdown relative link to image and other readme does ... - Jira
@chriscohoat Thanks for sharing the link. Too bad Bitbucket does not support relative links yet. I hope this will change soon. legacy-bitbucket-user.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found