Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions openedx/core/djangoapps/content_libraries/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ class ContentLibraryAdmin(admin.ModelAdmin):
"library_key",
"org",
"slug",
"learning_package",
"allow_public_learning",
"allow_public_read",
"authorized_lti_configs",
)
list_display = ("slug", "org",)

def get_readonly_fields(self, request, obj=None):
"""
Ensure that 'slug' and 'uuid' cannot be edited after creation.
"""
always_ro_fields = ["library_key", "learning_package"]
if obj:
return ["library_key", "org", "slug"]
else:
return ["library_key", ]
return [*always_ro_fields, "org", "slug"]
return always_ro_fields
Loading