diff options
Diffstat (limited to 'chimere/models.py')
-rw-r--r-- | chimere/models.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chimere/models.py b/chimere/models.py index 565cdd7..1c7db0d 100644 --- a/chimere/models.py +++ b/chimere/models.py @@ -177,8 +177,8 @@ class SubCategory(models.Model): if area_name: area = Area.objects.get(urn=area_name) # if there some restrictions with categories limit them - if area.subcategory_set.count(): - sub_ids = [sub.id for sub in area.subcategory_set.all()] + if area.subcategories.count(): + sub_ids = [sub.id for sub in area.subcategories.all()] # if no area is defined for a category don't filter it sub_ids += [sub.id for sub in subcategories if not sub.areas.count()] |