When a collection does not exist, render the 404 page.
get_creator=url_user,
slug=request.matchdict['collection']).first()
+ if not collection:
+ return render_404(request)
+
cursor = collection.get_collection_items()
pagination = Pagination(page, cursor)
collection = Collection.query.filter_by(
creator=user.id,
slug=request.matchdict['collection']).first()
+ if not collection:
+ return render_404(request)
cursor = CollectionItem.query.filter_by(
collection=collection.id) \