From 1d6d53e282f71a3f6eb920d60a218c2bafe7d431 Mon Sep 17 00:00:00 2001 From: j Date: Sat, 4 Aug 2018 16:24:43 +0100 Subject: [PATCH] cast to boolean --- pandora/clip/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/clip/models.py b/pandora/clip/models.py index 82e446d4..64639bdd 100644 --- a/pandora/clip/models.py +++ b/pandora/clip/models.py @@ -91,7 +91,7 @@ class MetaClip(object): self.findvalue = '\n'.join(list(filter(None, [a.findvalue for a in anns]))) for l in [k['id'] for k in settings.CONFIG['layers']]: - setattr(self, l, l in anns_by_layer and len(anns_by_layer[l])) + setattr(self, l, l in anns_by_layer and bool(len(anns_by_layer[l]))) models.Model.save(self, *args, **kwargs) clip_keys = ('id', 'in', 'out', 'position', 'created', 'modified',