Skip to content

Commit

Permalink
[xs,bug] Fixed the non appearance of current related item count on re…
Browse files Browse the repository at this point in the history
…source pages
  • Loading branch information
rossjones committed Apr 26, 2012
1 parent eedae4f commit b7b4a5e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ckan/controllers/package.py
Expand Up @@ -480,6 +480,7 @@ def edit(self, id, data=None, errors=None, error_summary=None):
c.errors_json = json.dumps(errors)

self._setup_template_variables(context, {'id': id}, package_type=package_type)
c.related_count = len(c.pkg.related)

# TODO: This check is to maintain backwards compatibility with the old way of creating
# custom forms. This behaviour is now deprecated.
Expand Down Expand Up @@ -749,6 +750,8 @@ def resource_read(self, id, resource_id):
c.package['isopen'] = False
c.datastore_api = h.url_for('datastore_read', id=c.resource.get('id'),
qualified=True)

c.related_count = len(c.pkg.related)
return render('package/resource_read.html')

def resource_embedded_dataviewer(self, id, resource_id):
Expand Down

0 comments on commit b7b4a5e

Please sign in to comment.