Opened 6 years ago

Closed 6 years ago

Last modified 8 weeks ago

#31123 closed New feature (fixed)

Add option to remove_stale_contenttypes to remove entries for nonexistent apps.

Reported by: Gowtham Kommineni Owned by: Gowtham Kommineni
Component: contrib.contenttypes Version: dev
Severity: Normal Keywords:
Cc: 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 (last modified by Javier Buzzi)

Add an option (disabled by default) to remove_stale_contenttypes command to remove entries also for nonexistent apps.

Based on discussion.

PR

Change History (7)

comment:1 by Mariusz Felisiak, 6 years ago

Resolution: wontfix
Status: newclosed
Summary: remove_stale_contenttypes doesn't remove entries for stale appsremove_stale_contenttypes doesn't remove entries for nonexistent apps.

I don't think that remove_stale_contenttypes should remove content types for nonexistent apps. We don't automatically remove models for nonexistent apps and I don't think we should do this with content types. This can also cause a data loss for a custom content types (not related to real apps). You can start a discussion on DevelopersMailingList if you don't agree.

comment:2 by Mariusz Felisiak, 6 years ago

Description: modified (diff)
Has patch: unset
Resolution: wontfix
Status: closednew
Summary: remove_stale_contenttypes doesn't remove entries for nonexistent apps.Add option to remove_stale_contenttypes to remove entries for nonexistent apps.
Triage Stage: UnreviewedAccepted
Type: BugNew feature
Version: 3.0master

Accepted based on discussion .

comment:3 by Javier Buzzi, 6 years ago

Description: modified (diff)
Has patch: set
Last edited 6 years ago by Mariusz Felisiak (previous) (diff)

comment:4 by Mariusz Felisiak, 6 years ago

Needs documentation: set
Owner: changed from nobody to Gowtham Kommineni
Patch needs improvement: set
Status: newassigned

comment:5 by Mariusz Felisiak, 6 years ago

Needs documentation: unset
Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:6 by Mariusz Felisiak <felisiak.mariusz@…>, 6 years ago

Resolution: fixed
Status: assignedclosed

In 142ab684:

Fixed #31123 -- Added --include-stale-apps option to the remove_stale_contenttypes management command.

Co-Authored-By: Javier Buzzi <buzzi.javier@…>

comment:7 by Mariusz Felisiak <felisiak.mariusz@…>, 8 weeks ago

In 8b229b4d:

Refs #31123 -- Simplified create_contentypes().

Since 142ab6846ac09d6d401e26fc8b6b988a583ac0f5
get_contenttypes_and_models() function was only used in this module and
we only needed the model names, not the content type objects themselves.

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