annotation layer flag is boolean

This commit is contained in:
j 2015-10-04 11:20:45 +02:00
parent 9265b8a53b
commit 5649892bbd

View file

@ -88,7 +88,7 @@ class MetaClip:
self.findvalue = '\n'.join(filter(None, [a.findvalue for a in anns])) self.findvalue = '\n'.join(filter(None, [a.findvalue for a in anns]))
for l in [k['id'] for k in settings.CONFIG['layers']]: for l in [k['id'] for k in settings.CONFIG['layers']]:
setattr(self, l, len(anns_by_layer[l]) if l in anns_by_layer else 0) setattr(self, l, l in anns_by_layer and len(anns_by_layer[l]))
models.Model.save(self, *args, **kwargs) models.Model.save(self, *args, **kwargs)
clip_keys = ('id', 'in', 'out', 'position', 'created', 'modified', clip_keys = ('id', 'in', 'out', 'position', 'created', 'modified',
@ -199,7 +199,7 @@ attrs = {
'end': models.FloatField(default=-1), 'end': models.FloatField(default=-1),
'duration': models.FloatField(default=0, db_index=True), 'duration': models.FloatField(default=0, db_index=True),
#get from annotation #get from annotation
'hue': models.FloatField(default=0, db_index=True), 'hue': models.FloatField(default=0, db_index=True),
'saturation': models.FloatField(default=0, db_index=True), 'saturation': models.FloatField(default=0, db_index=True),