summaryrefslogtreecommitdiff
path: root/chimere/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'chimere/models.py')
-rw-r--r--chimere/models.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/chimere/models.py b/chimere/models.py
index 8086c57..76e6821 100644
--- a/chimere/models.py
+++ b/chimere/models.py
@@ -1100,7 +1100,12 @@ class SimpleArea:
inner join chimere_route_categories rc on rc.subcategory_id=subcat.id and
rc.route_id=rt.id'''
sql += where
- subcats.union(SubCategory.objects.raw(sql))
+ # subcats.union(set(SubCategory.objects.raw(sql)))
+ # set union behave strangely. Doing it manualy...
+ for c in set(SubCategory.objects.raw(sql)):
+ subcats.add(c)
+ #if c not in subcats:
+ # new_subcats.append(c)
return subcats
class Layer(models.Model):