From 1329e29e20093dce3db14841daf5f601bdf76dd5 Mon Sep 17 00:00:00 2001 From: benscott Date: Thu, 7 Dec 2017 15:42:20 +0000 Subject: [PATCH] Fix DQI error string/list --- ckanext/gbif/lib/helpers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ckanext/gbif/lib/helpers.py b/ckanext/gbif/lib/helpers.py index 3b5994a..2c6e226 100755 --- a/ckanext/gbif/lib/helpers.py +++ b/ckanext/gbif/lib/helpers.py @@ -15,8 +15,10 @@ def dqi_parse_errors(dqi): """ errors = [] + # BS: Hacky bug fix - DQIs are passed in as a list on record view, but not on GBIF page! + dqi = dqi[0] if isinstance(dqi, list) else dqi try: - error_codes = dqi[0].split(';') + error_codes = dqi.split(';') except (AttributeError, TypeError): pass else: