From da686c199815137cf9c2b6ce1d1e8c00b82ea680 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Thu, 14 Jul 2016 10:48:28 -0500 Subject: [PATCH] Prevent erroring out in some cases of checking video metadata --- mediagoblin/media_types/video/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediagoblin/media_types/video/models.py b/mediagoblin/media_types/video/models.py index 4742b342..da635ed7 100644 --- a/mediagoblin/media_types/video/models.py +++ b/mediagoblin/media_types/video/models.py @@ -69,7 +69,7 @@ class VideoData(Base): orig_metadata = self.orig_metadata or {} if ("webm_video" not in self.get_media_entry.media_files - and "mimetype" in orig_metadata['common']['tags'] + and "mimetype" in orig_metadata.get('common', {}).get('tags', {}) and "codec" in orig_metadata['audio'] and "codec" in orig_metadata['video']): if orig_metadata['mimetype'] == 'application/ogg': -- 2.25.1