From a91358d574c73dbd36c1ceb5c554fcc829d54d3b Mon Sep 17 00:00:00 2001 From: j Date: Tue, 19 Jan 2016 17:42:45 +0530 Subject: [PATCH] dont fail without mediastate --- oml/item/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oml/item/models.py b/oml/item/models.py index 1cfe192..11ff57b 100644 --- a/oml/item/models.py +++ b/oml/item/models.py @@ -340,7 +340,7 @@ class Item(db.Model): first_peer = m # of fall back to first peer that has this item # in case its not available locally - if not sync_from and self.info['mediastate'] != 'available' and first_peer: + if not sync_from and self.info.get('mediastate') != 'available' and first_peer: #logger.debug('syncing from first peer that has item %s', first_peer) sync_from = first_peer if sync_from: