Removed read-only fields from enrollment admin

The read-only protection is more hassle than it's worth when testing locally and on stage. It's a solution to a problem we don't actually have, so I have reverted the changes.
This commit is contained in:
Clinton Blackburn
2015-11-02 09:25:56 -05:00
parent 1c66fbc812
commit c34dfac1ff

View File

@@ -138,12 +138,6 @@ class CourseEnrollmentAdmin(admin.ModelAdmin):
list_filter = ('mode', 'is_active',)
search_fields = ('course_id', 'mode', 'user__username',)
def get_readonly_fields(self, request, obj=None):
# The course_id, mode, and user fields should not be editable for an existing enrollment.
if obj:
return self.readonly_fields + ('course_id', 'mode', 'user',)
return self.readonly_fields
class Meta(object):
model = CourseEnrollment