Skip to content

Commit

Permalink
admin: make ProlongationRequest.status readonly
Browse files Browse the repository at this point in the history
Otherwise one could "accept" (or "deny") the request in the admin
without triggering anything (like creating the accepted prolongation).
  • Loading branch information
xavfernandez committed Jul 5, 2024
1 parent 64326b3 commit 46e588a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion itou/approvals/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ def denied_proposed_actions_explanation(self, obj):
return obj.deny_information.proposed_actions_explanation

def get_readonly_fields(self, request, obj=None):
fields = ProlongationCommonAdmin.readonly_fields + ("processed_at", "processed_by", "prolongation")
fields = ProlongationCommonAdmin.readonly_fields + ("processed_at", "processed_by", "prolongation", "status")
if not obj:
return fields

Expand Down

0 comments on commit 46e588a

Please sign in to comment.