Skip to content

Commit

Permalink
Don't throw error in case there are no extras
Browse files Browse the repository at this point in the history
  • Loading branch information
KrzysztofMadejski committed Mar 15, 2017
1 parent 5668c53 commit b6b57e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ckanext/archiver/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def create_archiver_package_task(package, queue):


def get_extra_from_pkg_dict(pkg_dict, key, default=None):
for extra in pkg_dict['extras']:
for extra in pkg_dict.get('extras',[]):
if extra['key'] == key:
return extra['value']
return default

0 comments on commit b6b57e0

Please sign in to comment.