Skip to content

Languages/Categories should delete themselves if they no longer exist #344

@aaron-junot

Description

@aaron-junot

Suppose we have a language called CSS/Bootstrap and then someone realized that that's two languages and then changes the languages for that resource to be ["CSS","Bootstrap"] instead. What happens to the language CSS/Bootstrap? Well, it gets orphaned. It exists, but there are not resources that have that language.

I think that whenever a resource is updated and the languages attribute is one of the changes, we should check that the old languages still exist on some resource. If they do not, then we should delete the language.

Same thing with categories. If a category gets removed from the last resource with that category, then the category should be deleted as well.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions