From 5797348bb379a92bd43864aa91eed703f0a3bcd1 Mon Sep 17 00:00:00 2001 From: Ruud Date: Fri, 20 Jun 2014 12:10:40 +0200 Subject: [PATCH] Update tag index --- couchpotato/core/media/_base/media/index.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/media/_base/media/index.py b/couchpotato/core/media/_base/media/index.py index 2166c0a..b40e162 100644 --- a/couchpotato/core/media/_base/media/index.py +++ b/couchpotato/core/media/_base/media/index.py @@ -178,7 +178,7 @@ class MediaChildrenIndex(TreeBasedIndex): class MediaTagIndex(MultiTreeBasedIndex): - _version = 1 + _version = 2 custom_header = """from CodernityDB.tree_index import MultiTreeBasedIndex""" @@ -187,7 +187,7 @@ class MediaTagIndex(MultiTreeBasedIndex): super(MediaTagIndex, self).__init__(*args, **kwargs) def make_key_value(self, data): - if data.get('_t') == 'media' and len(data.get('tags', [])) > 0: + if data.get('_t') == 'media' and data.get('tags') and len(data.get('tags', [])) > 0: tags = set() for tag in data.get('tags', []):