From d32140f33cfb0c952b965c6f4605c85420cb0d88 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 30 Nov 2017 15:54:53 +0100 Subject: Do not display categories when no category is available --- chimere/models.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'chimere/models.py') diff --git a/chimere/models.py b/chimere/models.py index 30c3be0..1598f38 100644 --- a/chimere/models.py +++ b/chimere/models.py @@ -334,8 +334,8 @@ class SubCategory(models.Model): if area.subcategories.count(): sub_ids = [sub.id for sub in area.subcategories.all()] subcategories = subcategories.filter(id__in=sub_ids) - selected_cats = [subcat.pk - for subcat in area.default_subcategories.all()] + selected_cats = [ + subcat.pk for subcat in area.default_subcategories.all()] if instance: return subcategories.order_by('order') @@ -624,7 +624,6 @@ class GeographicItem(models.Model): # add read attributes for properties for pm in self.all_properties(): attr_name = pm.getAttrName() - print(attr_name) if not hasattr(self, attr_name): val = '' property = self.getProperty(pm) -- cgit v1.2.3