Fix/foldit leaderboard - #394
Merged
Merged
Conversation
|
Don't merge until we make the current course be passed by default to get_tops_n, and add an attribute that allows more courses/runs to be added to "course_list" |
Contributor
There was a problem hiding this comment.
This is dangerous, generally. I don't think you have a problem in this function as it stands, but using mutable values as default arguments in python often leads to memory leaks. Better practice, generally, is to use None, and then at the top of the function, say
if course_list is None:
course_list = []
Contributor
There was a problem hiding this comment.
And, in fact, since the only thing you do w/ course list is check for [] and do one query, or do a different query, you can just use None as your signal value instead.
|
👍 |
1 similar comment
Contributor
|
👍 |
chrisrossi
pushed a commit
to jazkarta/edx-platform
that referenced
this pull request
Mar 31, 2014
…dules Hide errors from non-staff users
chrisrossi
pushed a commit
to jazkarta/edx-platform
that referenced
this pull request
Mar 31, 2014
e-kolpakov
referenced
this pull request
in open-craft/openedx-platform
Mar 9, 2015
mattdrayer/fix_broken_tests: Updated stale dates throughout test suite
diegomillan
pushed a commit
to eduNEXT/edx-platform
that referenced
this pull request
Sep 14, 2016
* dylanrhodes/cme_unpaid_users: Include unpaid registrations in user data table
xavierchan
added a commit
to xavierchan/edx-platform-1
that referenced
this pull request
May 20, 2019
Sujeet1379
pushed a commit
to chandrudev/edx-platform
that referenced
this pull request
Nov 17, 2022
Danyal-Faheem
pushed a commit
to Danyal-Faheem/edx-platform
that referenced
this pull request
Jul 15, 2025
…thread_creation_mail_receivers_list updated the list of staff receiving the mail on thread creation on fo…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sorts the foldit top_n list by course
@jkarni
@johnhess