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: