diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-11-30 15:54:53 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-11-30 15:54:53 +0100 |
commit | d32140f33cfb0c952b965c6f4605c85420cb0d88 (patch) | |
tree | 3abc0ace273364720fd395d7fed6110104057d80 /chimere/models.py | |
parent | 72bda3fe8a40a0e3f7a96e9188802fd0b30b5763 (diff) | |
download | Chimère-d32140f33cfb0c952b965c6f4605c85420cb0d88.tar.bz2 Chimère-d32140f33cfb0c952b965c6f4605c85420cb0d88.zip |
Do not display categories when no category is available
Diffstat (limited to 'chimere/models.py')
-rw-r--r-- | chimere/models.py | 5 |
1 files changed, 2 insertions, 3 deletions
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) |