Skip to content

Commit 37daf24

Browse files
Merge branch 'master' into marlonkeating/upgrade-edx-enterprise-52f2231
2 parents 4e811a6 + bf2959e commit 37daf24

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

  • cms/djangoapps/contentstore
  • openedx/core/djangoapps/notifications

cms/djangoapps/contentstore/tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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])

openedx/core/djangoapps/notifications/admin.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)