Verified Commit 96356d3f authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Prevent editing of completed registrations

parent c77b1407
......@@ -102,7 +102,8 @@ class RegistrationAdmin(admin.ModelAdmin):
def get_readonly_fields(self, request, obj=None):
if obj is None or not (obj.status == Entry.STATUS_REJECTED or
obj.status == Entry.STATUS_ACCEPTED):
obj.status == Entry.STATUS_ACCEPTED or
obj.status == Entry.STATUS_COMPLETED):
return ['status', 'created_at', 'updated_at']
else:
return [field.name for field in self.model._meta.get_fields()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment