Merge pull request #771 from samj1912/moretests

Fix error while fetching collections in a release group
This commit is contained in:
Laurent Monin
2017-07-24 18:03:44 +02:00
committed by GitHub

View File

@@ -273,10 +273,7 @@ def media_formats_from_node(node):
formats_count = {}
formats_order = []
for medium in node:
try:
text = medium['format']
except KeyError:
text = "(unknown)"
text = medium.get('format', "(unknown)") or "(unknown)"
if text in formats_count:
formats_count[text] += 1
else: