From 2ef65271622972a7adf2a44b0c3195237340b8f1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stefan=20K=C3=B6gl?= Date: Wed, 25 Nov 2015 20:51:00 +0100 Subject: [PATCH] [API] handle empty URLs in episode action upload --- mygpo/api/advanced/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mygpo/api/advanced/__init__.py b/mygpo/api/advanced/__init__.py index e62f1b71..dd4d8365 100644 --- a/mygpo/api/advanced/__init__.py +++ b/mygpo/api/advanced/__init__.py @@ -211,12 +211,12 @@ def update_episodes(user, actions, now, ua_string): podcast_url = action.get('podcast', '') podcast_url = sanitize_append(podcast_url, update_urls) - if podcast_url == '': + if not podcast_url: continue episode_url = action.get('episode', '') episode_url = sanitize_append(episode_url, update_urls) - if episode_url == '': + if not episode_url: continue podcast = Podcast.objects.get_or_create_for_url(podcast_url) -- 2.11.4.GIT