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

add admin command to delete unattached ingredients and steps #2488

Merged
merged 1 commit into from
Jun 8, 2023

Conversation

smilerz
Copy link
Collaborator

@smilerz smilerz commented Jun 2, 2023

creates two admin actions:

  • delete all Ingredients not part of a recipe
  • delete all Steps not part of a recipe

@vabene1111 vabene1111 merged commit 3a26f09 into TandoorRecipes:develop Jun 8, 2023
2 of 3 checks passed
@tomtjes
Copy link
Contributor

tomtjes commented Jun 24, 2023

@smilerz Could the same be done for foods, units and keywords?

@smilerz smilerz deleted the delete_empty branch July 5, 2023 19:19
@smilerz
Copy link
Collaborator Author

smilerz commented Jul 5, 2023

@smilerz Could the same be done for foods, units and keywords?

theoretically - but I wouldn't implement it. There are valid scenarios where food and keywords especially, are intentionally unused (root of hierarchy in my personal use case) - allowing mass deletion in those cases would likely lead to unintended outcomes.

@tomtjes
Copy link
Contributor

tomtjes commented Jul 5, 2023

That makes sense. I have a hacky script that deletes unused keywords and foods (and checks that they don't have children in the hierarchy) via the API, and had hoped for a simpler solution to get rid of clutter that inevitably comes with importing web recipes.

@smilerz
Copy link
Collaborator Author

smilerz commented Jul 5, 2023

Eventually we’ll add filters and multi-edit capabilities to the management page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants