Skip to content
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

fix for issue #136 : tags counting #155

Merged
merged 1 commit into from
Jun 25, 2012
Merged

Conversation

josmas
Copy link

@josmas josmas commented Jun 25, 2012

Hey Dirk,

Please have a look at the commit; it adds a test and some refactoring; It actually fixes the counting problem #136 but there is an issue with filtering out all groups but Challenges in the view (discussed in mailing list). Will add a separate bug for that (not sure I have permissions) and a different pull request (I have it tracked down but want to create a test to reproduce it; although as you mentioned, testing the views is a lot messier, so will take a bit).

cheers!

@@ -417,10 +417,15 @@ def get_non_started_next_projects(self, user):
return Project.objects.none()

@classmethod
def get_projects_excluded_from_listing(cls):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a thought, but wouldn't it make more sense to return the listed projects? The queries in get_popular_tags and get_weighted_tags can also be changed to use the listed projects instead.

Also, consider returning the QuerySet rather than a list of ids

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heya, it does make sense; actuallay I was stuck for a while till I figured out that it was a dict of ids. It makes the test harder to write, which in itself is a sign that something is wrong. :)

I won't have time to look at this for now, so feel free to apply it and we can revisit later, or to make the changes yourself, or I will make them probably at the weekend.

@dirkcuys
Copy link
Member

Cool, I'll merge and make the changes!

dirkcuys added a commit that referenced this pull request Jun 25, 2012
fix for issue #136 : tags counting
@dirkcuys dirkcuys merged commit 5c67167 into p2pu:master Jun 25, 2012
dirkcuys added a commit that referenced this pull request Aug 31, 2012
fix for issue #136 : tags counting
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

Successfully merging this pull request may close these issues.

2 participants