fixed ingredient deletion error

This commit is contained in:
vabene1111
2020-06-10 11:52:24 +02:00
parent 12036b9972
commit 9575a86480
3 changed files with 12 additions and 17 deletions

View File

@@ -79,18 +79,6 @@ class KeywordDelete(GroupRequiredMixin, DeleteView):
return context
class IngredientDelete(GroupRequiredMixin, DeleteView):
groups_required = ['user']
template_name = "generic/delete_template.html"
model = Ingredient
success_url = reverse_lazy('list_ingredient')
def get_context_data(self, **kwargs):
context = super(IngredientDelete, self).get_context_data(**kwargs)
context['title'] = _("Ingredient")
return context
class StorageDelete(GroupRequiredMixin, DeleteView):
groups_required = ['admin']
template_name = "generic/delete_template.html"