Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Orphaned Tags #682

Open
steverecio opened this issue Aug 4, 2020 · 3 comments
Open

Orphaned Tags #682

steverecio opened this issue Aug 4, 2020 · 3 comments
Assignees

Comments

@steverecio
Copy link
Contributor

I've noticed orphaned tags starting to accumulate when all their references are deleted. Would it make sense to auto-delete tags that aren't attached to anything?

@rtpg
Copy link
Contributor

rtpg commented Apr 14, 2021

It might make sense to have (for example) a management task that does this. Though To be honest this is very dependent on the use case (for example you might set up your tags, and for now there are no usages but you'll want it later. Kinda like labels on github issues!)

Kind of a hard thing to solve in a non-ad-hoc way, so this might be a "Write up something for the FAQ" thing

@rtpg rtpg added the docs label Apr 14, 2021
@rtpg
Copy link
Contributor

rtpg commented Apr 14, 2021

#111 is related

@chgad
Copy link

chgad commented Mar 8, 2022

How about a keyword argument in the TaggableManager for instance delete_orphans=False, which is handed over to the through-model that actually handles the deletion?

This way we can define a standard method to delete orphans or by using a custom through model the user can even override this mention.

Another idea would be to hand a deletion_function=None to the TaggableManager which registers the function in place for the post_delete signal (inspired by #111).

I guess my first idea is a lot cleaner than the second one...

rtpg added a commit that referenced this issue Jul 30, 2024
@guel-codes guel-codes self-assigned this Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants