From afaa9178cfb658e83b3fc4fc8f2f93a5021dada2 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 1 Feb 2012 16:35:57 +0000 Subject: [PATCH] return defined --- pandora/annotation/models.py | 4 ++-- pandora/event/models.py | 1 + pandora/place/models.py | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pandora/annotation/models.py b/pandora/annotation/models.py index c42d0ecc..3b6305bc 100644 --- a/pandora/annotation/models.py +++ b/pandora/annotation/models.py @@ -189,11 +189,11 @@ class Annotation(models.Model): l = self.get_layer() if l['type'] == 'place': - qs = self.places.filter(defined=True) + qs = self.places.all() if qs.count() > 0: j['place'] = qs[0].json(user=user) elif l['type'] == 'event': - qs = self.events.filter(defined=True) + qs = self.events.all() if qs.count() > 0: j['event'] = qs[0].json(user=user) diff --git a/pandora/event/models.py b/pandora/event/models.py index 34a1f996..406ce459 100644 --- a/pandora/event/models.py +++ b/pandora/event/models.py @@ -141,6 +141,7 @@ class Event(models.Model): def json(self, user=None): j = { 'id': self.get_id(), + 'defined': self.defined, 'editable': self.editable(user) } if self.user: diff --git a/pandora/place/models.py b/pandora/place/models.py index bb9da423..75610229 100644 --- a/pandora/place/models.py +++ b/pandora/place/models.py @@ -83,6 +83,7 @@ class Place(models.Model): def json(self, keys=None, user=None): j = { 'id': self.get_id(), + 'defined': self.defined, 'editable': self.editable(user) } if self.user: