Revert "Merge pull request #18150 from edx/efischer/last_one_i_swear"

This reverts commit fcef6b3f47, reversing
changes made to 0b11634e4c.
This commit is contained in:
Eric Fischer
2018-05-09 11:53:56 -04:00
parent 6b29c6b920
commit f7a66eab78
2 changed files with 3 additions and 2 deletions

View File

@@ -153,9 +153,10 @@ def get_threads(request, course, user_info, discussion_id=None, per_page=THREADS
# If not provided with a discussion id, filter threads by commentable ids
# which are accessible to the current user.
if discussion_id is None:
discussion_category_ids = set(utils.get_discussion_categories_ids(course, request.user))
threads = [
thread for thread in threads
if utils.discussion_category_id_access(course, request.user, thread.get('commentable_id'), thread)
if thread.get('commentable_id') in discussion_category_ids
]
for thread in threads:

View File

@@ -110,7 +110,7 @@ def has_required_keys(xblock):
log.debug(
"Required key '%s' not in discussion %s, leaving out of category map",
key,
getattr(xblock, 'location', None)
xblock.location
)
return False
return True