Skip to content

Commit

Permalink
feat: TNL-10136 fix build errors
Browse files Browse the repository at this point in the history
blank lines in __init__
private method that needed to be public
importlib and importlib-resources dependencies
  • Loading branch information
Bernard Szabo authored and bszabo committed Dec 13, 2022
1 parent 377edc2 commit 89086d4
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 64,775 deletions.
1 change: 0 additions & 1 deletion common/djangoapps/student/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
'''
from .course_enrollment import *
from .user import *

6 changes: 3 additions & 3 deletions common/djangoapps/student/models/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def get_retired_email_by_email(email):
return user_util.get_retired_email(email, settings.RETIRED_USER_SALTS, settings.RETIRED_EMAIL_FMT)


def _get_all_retired_usernames_by_username(username):
def get_all_retired_usernames_by_username(username):
"""
Returns a generator of "retired usernames", one hashed with each
configured salt. Used for finding out if the given username has
Expand All @@ -319,7 +319,7 @@ def get_potentially_retired_user_by_username(username):
does not exist, then any hashed username salted with the historical
salts.
"""
locally_hashed_usernames = list(_get_all_retired_usernames_by_username(username))
locally_hashed_usernames = list(get_all_retired_usernames_by_username(username))
locally_hashed_usernames.append(username)
potential_users = User.objects.filter(username__in=locally_hashed_usernames)

Expand Down Expand Up @@ -364,7 +364,7 @@ def get_potentially_retired_user_by_username_and_hash(username, hashed_username)
does not exist, the any hashed username salted with the historical
salts.
"""
locally_hashed_usernames = list(_get_all_retired_usernames_by_username(username))
locally_hashed_usernames = list(get_all_retired_usernames_by_username(username))

if hashed_username not in locally_hashed_usernames:
raise Exception('Mismatched hashed_username, bad salt?')
Expand Down
1 change: 1 addition & 0 deletions common/djangoapps/student/tests/test_retirement.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

from openedx.core.djangolib.testing.utils import skip_unless_lms
from common.djangoapps.student.models import (
get_all_retired_usernames_by_username,
get_potentially_retired_user_by_username,
get_potentially_retired_user_by_username_and_hash,
get_retired_email_by_email,
Expand Down
Loading

0 comments on commit 89086d4

Please sign in to comment.