wcs: don't fail on errors getting list of categories (#11167)

This commit is contained in:
Frédéric Péters 2016-05-28 18:32:04 +02:00
parent 3fc67cfb67
commit fd63b93a4d
1 changed files with 2 additions and 0 deletions

View File

@ -36,6 +36,8 @@ def get_wcs_options(url, include_category_slug=False):
site_title = wcs_site.get('title')
response_json = get_wcs_json(wcs_site, url)
if type(response_json) is dict:
if response_json.get('err') == 1:
continue
response_json = response_json.get('data')
for element in response_json:
slug = element.get('slug')