summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chimere/rss/feeds.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/chimere/rss/feeds.py b/chimere/rss/feeds.py
index 0094a60..18a4259 100644
--- a/chimere/rss/feeds.py
+++ b/chimere/rss/feeds.py
@@ -36,8 +36,8 @@ class BaseFeed(Feed):
''' Return POI permalink '''
coord = item.point
cat = 0
- if item.categories.all():
- cat = item.categories.all()[0]
+ if item.categories.all() and item.categories.all()[0]:
+ cat = item.categories.all()[0].pk
return settings.BASE_URL + '?zoom=16&lat=%d&lon=%d&current_feature=%d&\
checked_categories=%d' % (coord.y, coord.x, item.id, cat)