diff options
Diffstat (limited to 'chimere/models.py')
-rw-r--r-- | chimere/models.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/chimere/models.py b/chimere/models.py index a052b66..5a8157f 100644 --- a/chimere/models.py +++ b/chimere/models.py @@ -914,7 +914,9 @@ class GeographicItem(models.Model): 'icon_offset_y': cat.icon.offset_y, 'icon_popup_offset_x': cat.icon.popup_offset_x, 'icon_popup_offset_y': cat.icon.popup_offset_y, - 'category_name': cat.name} + 'category_name': cat.name, + 'category_id': cat.pk, + } try: categories_icons[item['categories__pk']].update( {'icon_width': cat.icon.image.width, @@ -971,7 +973,7 @@ class GeographicItem(models.Model): value['properties']['extra_colors'].append(colors) continue if limit_to_categories and \ - item["categories__pk"] not in limit_to_categories: + item["categories__pk"] not in limit_to_categories: continue if start: start -= 1 @@ -1249,7 +1251,9 @@ class Marker(GeographicItem): 'icon_offset_y': cat.icon.offset_y, 'icon_popup_offset_x': cat.icon.popup_offset_x, 'icon_popup_offset_y': cat.icon.popup_offset_y, - 'category_name': cat.name}) + 'category_name': cat.name, + 'category_id': cat.pk, + }) try: items['properties'].update( {'icon_width': cat.icon.image.width, |