Commit e066385b authored by David Read's avatar David Read
Browse files

Merge commit '9a70e1a2' into fix-travis

parents 95471a06 9a70e1a2
......@@ -118,7 +118,13 @@ def migrate(options):
def add_stat(outcome, res, stats, extra_info=None):
res_id = '%s %s' % (res.resource_group.package.name, res.id[:4])
try:
# pre CKAN 2.3 model
package_name = res.resource_group.package.name
except AttributeError:
# CKAN 2.3+ model
package_name = res.package.name
res_id = '%s %s' % (package_name, res.id[:4])
if extra_info:
res_id += ' %s' % extra_info
return '\n' + stats.add(outcome, res_id)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment