File tree Expand file tree Collapse file tree
cms/djangoapps/contentstore
openedx/core/djangoapps/notifications Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1375,7 +1375,7 @@ def _filter_by_status(results):
13751375 continue
13761376 elif status == 403 and _is_studio_url (url ):
13771377 filtered_results .append ([block_id , url , LinkState .LOCKED ])
1378- elif status in [403 , None ] and not _is_studio_url (url ):
1378+ elif status in [403 , 500 , None ] and not _is_studio_url (url ):
13791379 filtered_results .append ([block_id , url , LinkState .EXTERNAL_FORBIDDEN ])
13801380 else :
13811381 filtered_results .append ([block_id , url , LinkState .BROKEN ])
Original file line number Diff line number Diff line change @@ -82,6 +82,10 @@ class CourseNotificationPreferenceAdmin(admin.ModelAdmin):
8282 def get_username (self , obj ):
8383 return obj .user .username
8484
85+ def get_queryset (self , request ):
86+ queryset = super ().get_queryset (request )
87+ return queryset .select_related ("user" ).only ("id" , "user__username" , "course_id" )
88+
8589 def get_search_results (self , request , queryset , search_term ):
8690 """
8791 Custom search for CourseNotificationPreference model
You can’t perform that action at this time.
0 commit comments