Skip to content

Commit

Permalink
Merge pull request #95 from FCSCOpendata/fix/resource-description
Browse files Browse the repository at this point in the history
Resource description disappear in resource update bug fix
  • Loading branch information
anuveyatsu authored Oct 5, 2022
2 parents 6883967 + 16845ad commit 66a4ceb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ckanext/fcscopendata/logic/action/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ def package_update(up_func, context, data_dict):
# Map resource description from scheming note field
if data_dict.get('resources', False):
for resources in data_dict['resources']:
resources['description'] = resources.get('notes_translated-en', '')
if resources.get('notes_translated-en', False):
resources['description'] = resources.get('notes_translated-en', '')
else:
resources['description'] = resources.get('notes_translated', {}).get('en', '')
result = up_func(context, data_dict)

# Update package member for groups
Expand Down

0 comments on commit 66a4ceb

Please sign in to comment.