Skip to content

Commit

Permalink
Merge pull request #2 from NaturalHistoryMuseum/dqi-error-string
Browse files Browse the repository at this point in the history
Fix DQI error string/list
  • Loading branch information
benscott authored Dec 7, 2017
2 parents 366a5f0 + 1329e29 commit 1e00321
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ckanext/gbif/lib/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 1e00321

Please sign in to comment.