From 6c21c023599fad0f3c19c6d00ffb8e1e241be30b Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Mon, 20 Jun 2011 17:27:06 +0200 Subject: [PATCH] place name --- pandora/annotation/managers.py | 2 +- static/js/pandora/ui/list.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora/annotation/managers.py b/pandora/annotation/managers.py index b0447a676..c0377c0c9 100644 --- a/pandora/annotation/managers.py +++ b/pandora/annotation/managers.py @@ -20,7 +20,7 @@ def parseCondition(condition, user): k = condition.get('key', 'name') k = { 'user': 'user__username', - 'place': 'places__id', + 'place': 'places__name', }.get(k, k) if not k: k = 'name' diff --git a/static/js/pandora/ui/list.js b/static/js/pandora/ui/list.js index d56399777..c5366b499 100644 --- a/static/js/pandora/ui/list.js +++ b/static/js/pandora/ui/list.js @@ -155,7 +155,7 @@ pandora.ui.list = function(view) { // fixme: remove view argument items: function(data, callback) { return pandora.api.findAnnotations($.extend(data, { query: { - conditions:[{key: 'place', value: place.id, operator:'='}] + conditions:[{key: 'place', value: place.name, operator:'='}] }, itemQuery: pandora.Query.toObject() }), callback);