summaryrefslogtreecommitdiff
path: root/chimere/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@peacefrogs.net>2012-05-06 01:55:25 +0200
committerÉtienne Loks <etienne.loks@peacefrogs.net>2012-05-06 01:55:25 +0200
commitf18b08183858a6330f1138e5b619ea886317bed8 (patch)
tree7067ea9075a131f90c55c1952a9a0d64a5bf0b66 /chimere/models.py
parente01b6a270a4c5a790ef70b799e404fe062c1b0de (diff)
downloadChimère-f18b08183858a6330f1138e5b619ea886317bed8.tar.bz2
Chimère-f18b08183858a6330f1138e5b619ea886317bed8.zip
Improve area management
Diffstat (limited to 'chimere/models.py')
-rw-r--r--chimere/models.py4
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()]