Skip to content

Commit ae301cb

Browse files
committed
Fix crash due to unapproved packages in collection
1 parent 3af49ee commit ae301cb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/blueprints/collections/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def view(author, name):
7171
).all()
7272

7373
if not collection.check_perm(current_user, Permission.EDIT_COLLECTION):
74-
items = [x for x in items if x.package.check_perm(current_user, Permission.VIEW_PACKAGE)]
74+
items = [x for x in items if x.package.approved]
7575

7676
if should_return_json():
7777
return jsonify([ item.package.as_key_dict() for item in items ])

0 commit comments

Comments
 (0)