Skip to content

Commit

Permalink
Merge pull request #11 from alexandru-m-g/patch-2
Browse files Browse the repository at this point in the history
PR quick fix for deleted dataset
  • Loading branch information
ZoranPandovski authored Aug 29, 2017
2 parents c1c7cd8 + 9b6061d commit 7ab9413
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ckanext/requestdata/controllers/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,13 @@ def my_requested_data(self, id):
item['requests'] = count.requests

for item in requests:
package = _get_action('package_show', {'id': item['package_id']})
package_maintainers_ids = package['maintainer'].split(',')
item['title'] = package['title']
try:
package = _get_action('package_show', {'id': item['package_id']})
package_maintainers_ids = package['maintainer'].split(',')
item['title'] = package['title']
except NotFound, e:
# package was not found, possibly deleted
continue
maintainers = []
for i in package_maintainers_ids:
try:
Expand Down

0 comments on commit 7ab9413

Please sign in to comment.