I would argue the implications of calling list() in the readme is not obvious without a deep understanding here.
however, this makes it easy, and surprising (!), to write unsafe code that changes the model admin's change_actions definition in one request, and have that change persist across multiple requests.
a safer default approach would be to return a copy of self.change_actions instead.
why does
get_change_actions
return a reference toself.change_actions
? is there an use case for such behavior?id
checklist()
explicitly over the result ofget_change_actions()
list()
in the readme is not obvious without a deep understanding here.change_actions
definition in one request, and have that change persist across multiple requests.self.change_actions
instead.