Skip to content

Commit

Permalink
[VGNWB-256] fixed project not opening when an empty text is included … (
Browse files Browse the repository at this point in the history
#134)

* [VGNWB-256] fixed project not opening when an empty text is included in the project.

* [VGNWB-256] fixed if statement
  • Loading branch information
tjquinn1 authored and jdamerow committed Sep 14, 2018
1 parent 9e6960b commit 2a0989e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions annotations/views/repository_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,21 +97,20 @@ def repository_collection(request, repository_id, collection_id):
collection = manager.collection(id=collection_id, **params)
except IOError:
return render(request, 'annotations/repository_ioerror.html', {}, status=500)

project_id = request.GET.get('project_id')
base_url = reverse('repository_collection', args=(repository_id, collection_id))
base_params = {}
if project_id:
base_params.update({'project_id': project_id})

resources = collection.get('resources', [])
context = {
'user': request.user,
'repository': repository,
'collection': collection,
'collection_id': collection_id,
'title': 'Browse collections in %s' % repository.name,
'project_id': project_id,
'resources': collection.get('resources', []),
'resources': [resource for resource in resources if resource['url']],
'subcollections': collection.get('subcollections', [])
}
previous_page, next_page = _get_pagination(collection, base_url, base_params)
Expand Down

0 comments on commit 2a0989e

Please sign in to comment.