Many-to-many fields do not trigger confirmation unless specified in "get_confirmation_fields" method #48
Labels
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Extra attention is needed
Describe the bug
I use
AdminConfirmMixin
andadmin.ModelAdmin
, settingconfirm_change = True
. Fields that are not ManyToMany correctly trigger confirmation page. However, my ManyToManyField did not trigger it until I included it in the return value ofget_confirmation_fields
.Expected behavior
If no confirmation_fields are specified, then all model fields should trigger confirmation page, even ManyToManyField type ones.
Versions
django-admin-confirm==1.0.0
python 3.11
Additional context
There reason is this line:
https://github.com/TrangPham/django-admin-confirm/blob/main/admin_confirm/admin.py#L58
ManyToManyFields do not appear in model._meta.fields
The text was updated successfully, but these errors were encountered: