From 4be8f0ea4dbffa4d0b2fde337de1d31f08fb2b8e Mon Sep 17 00:00:00 2001 From: Addison Schiller Date: Tue, 28 Nov 2017 16:47:47 -0500 Subject: [PATCH] fix get_alt_export_link --- waterbutler/providers/googledrive/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/waterbutler/providers/googledrive/utils.py b/waterbutler/providers/googledrive/utils.py index 19fba3628..4ba6cc178 100644 --- a/waterbutler/providers/googledrive/utils.py +++ b/waterbutler/providers/googledrive/utils.py @@ -69,7 +69,10 @@ def get_alt_download_extension(metadata): def get_alt_export_link(metadata): format_type = get_format(metadata) export_links = metadata['exportLinks'] - return export_links.get(format_type['alt_type'], None) or export_links[format_type['type']] + if format_type.get('alt_type'): + return export_links.get(format_type['alt_type']) + else: + return export_links[format_type['type']] def get_export_link(metadata):