You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'result' cannot be specified for MyTaskResult model form as it is a non-editable field. Check fields/fieldsets/exclude attributes of class MyTaskResultAdmin.
#394
Open
chunkai-meng opened this issue
Jun 3, 2023
· 2 comments
If I use a proxy model and register MyTaskResultAdmin inherited from TaskResultAdmin,
will show the error above
found in django_celery_results.admin.TaskResultAdmin.get_readonly_fields
defget_readonly_fields(self, request, obj=None):
ifALLOW_EDITS:
returnself.readonly_fieldselse:
returnlist({
field.nameforfieldinself.opts.local_fields# will return [] even readonly_fields is set, which leads to the error# field.name for field in self.model._meta.fields # Change to this fix the problem, but I'm not sure if this is the correct way
})
The text was updated successfully, but these errors were encountered:
If I use a proxy model and register MyTaskResultAdmin inherited from TaskResultAdmin,
will show the error above
found in
django_celery_results.admin.TaskResultAdmin.get_readonly_fields
The text was updated successfully, but these errors were encountered: