Opened 4 months ago

Closed 2 weeks ago

Last modified 2 weeks ago

#36979 closed Bug (fixed)

GenericInlineModelAdmin doesn't respect ModelAdmin.get_exclude()

Reported by: Tim Graham Owned by: MANAS MADESHIYA
Component: contrib.contenttypes Version: 6.0
Severity: Normal Keywords:
Cc: MANAS MADESHIYA Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The ModelAdmin.get_exclude() hook was added in #24941, however, GenericInlineModelAdmin doesn't use it.

Change History (11)

comment:1 by Elias Stinson, 4 months ago

Triage Stage: UnreviewedAccepted
Type: BugCleanup/optimization

Going to move this triage to accepted, I would recommend someone who knows more about the admin model to go and fix it. I’m also going to change the status to clean up just because the feature is working just not using the efficient function. Good luck!

comment:2 by MANAS MADESHIYA, 4 months ago

Cc: MANAS MADESHIYA added
Owner: set to MANAS MADESHIYA
Status: newassigned

comment:3 by MANAS MADESHIYA, 4 months ago

Has patch: set

I have submitted a PR for this ticket:
PR

comment:4 by Elias Stinson, 4 months ago

Needs documentation: set
Triage Stage: AcceptedReady for checkin

The PR looks great, and I'll just recommend to add yourself to the contributors section, just for your own benefit. Someone else can check me on this, but I think this would warrant creating a documentation page for this, as the feature I don't think has one already, or at least it should be improved to now state that the function is called by django. Anyways, I'll mark it both for ready to checkin, and needs documentation for said fix.

comment:5 by Jacob Walls, 4 months ago

Needs documentation: unset
Triage Stage: Ready for checkinAccepted

If you're suggesting the patch needs documentation, that's inconsistent with marking it Ready for Checkin.

I'm going to second the advice I just mentioned in another ticket to ask you to slow down and read the triage workflow docs, and reduce the frequency of your participation until you demonstrate more understanding. Thanks.

Last edited 4 months ago by Jacob Walls (previous) (diff)

comment:6 by Jacob Walls, 4 months ago

Has patch: unset
Owner: MANAS MADESHIYA removed
Status: assignednew

comment:7 by MANAS MADESHIYA, 4 months ago

Hi @jacobtylerwalls ,

I apologize for the incomplete AI disclosure.
I used Claude (claude.ai) as an AI assistant
while working on this fix. I reviewed and
verified all code changes myself and ran
the full test suite locally (21 tests passing).

I would like to submit a new PR with proper
disclosure. May I do so?

Thank you for your patience.

comment:8 by Jacob Walls, 4 months ago

Has patch: set
Owner: set to MANAS MADESHIYA
Status: newassigned

Original PR reopened.

comment:9 by Jacob Walls, 2 weeks ago

Triage Stage: AcceptedReady for checkin
Type: Cleanup/optimizationBug

comment:10 by Jacob Walls <jacobtylerwalls@…>, 2 weeks ago

Resolution: fixed
Status: assignedclosed

In e1df395:

Fixed #36979 -- Made GenericInlineModelAdmin.get_formset() use get_exclude().

comment:11 by Jacob Walls <jacobtylerwalls@…>, 2 weeks ago

In f51bdd9:

[6.1.x] Fixed #36979 -- Made GenericInlineModelAdmin.get_formset() use get_exclude().

Backport of e1df3950b2a3a852dfa9eb70738b7bac28cb0a0e from main.

Note: See TracTickets for help on using tickets.
Back to Top