From 79e76ca0b0926c53f64ba6db1f9d0e8fd4002269 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 2 Nov 2011 14:26:38 +0100 Subject: [PATCH] update clip layer flag --- pandora/annotation/models.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pandora/annotation/models.py b/pandora/annotation/models.py index 0322057d4..00f7e84d9 100644 --- a/pandora/annotation/models.py +++ b/pandora/annotation/models.py @@ -126,6 +126,12 @@ class Annotation(models.Model): super(Annotation, self).save(*args, **kwargs) if set_public_id: self.set_public_id() + + Clip.objects.filter(**{ + 'id': self.clip.id, + self.layer.name: False + }).update(**{self.layer.name: True}) + #how expensive is this? #update_matching_events.delay(self.value) #update_matching_places.delay(self.value)