I think it could be - if not the exact same issue - one that would be fixed by the same patch. My specific use case is something like this:
class MyUserAdmin(UserAdmin):
def get_fieldsets(self, request, obj=None):
fieldsets = super().get_fieldsets(request, obj)
fieldsets[0][1]['fields'] = list(fieldsets[0][1]['fields'])
fieldsets[0][1]['fields'].append('category')
which is already pretty ugly, but needs uglifying further:
class MyUserAdmin(UserAdmin):
def get_fieldsets(self, request, obj=None):
fieldsets = super().get_fieldsets(request, obj)
fieldsets[0][1]['fields'] = list(fieldsets[0][1]['fields'])
if 'category' not in fieldsets[0][1]['fields'][-1]:
fieldsets[0][1]['fields'].append('category')
Logically, they could be the same issue, but I haven't dug in to see if this is the case. Is it really the case that the overhead of deepcopy() is too much here?