diff --git a/categories/views.py b/categories/views.py index 9ef3ba5..a609453 100644 --- a/categories/views.py +++ b/categories/views.py @@ -150,7 +150,7 @@ class DeleteCategory(LogMixin, DeleteView): category = get_object_or_404(Category, slug = self.kwargs.get('slug')) subjects = Subject.objects.filter(category = category) - if len(subjects) > 0: + if subjects.count() > 0: #objeto = category #messages.success(self.request, _('cannot delete Category "%s" ')%(objeto)) return reverse_lazy('categories:index') diff --git a/subjects/templates/subjects/list.html b/subjects/templates/subjects/list.html index c47e2c4..1891722 100644 --- a/subjects/templates/subjects/list.html +++ b/subjects/templates/subjects/list.html @@ -59,14 +59,14 @@
{% endif %} - {% if not user.is_staff %} +
- {% endif %} + -- libgit2 0.21.2