Fix empty collections being shown on user pages (#3864)

Originally changed in #3408 but didn't address the full issue.
This commit is contained in:
Emma Alexia 2025-06-29 09:37:41 -04:00 committed by GitHub
parent 479aaf503b
commit 14b1ff79e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -336,7 +336,7 @@ pub async fn filter_visible_collections(
let mut check_collections = Vec::new(); let mut check_collections = Vec::new();
for collection in collections { for collection in collections {
if !collection.status.is_hidden() if (!collection.status.is_hidden() && !collection.projects.is_empty())
|| user_option.as_ref().is_some_and(|x| x.role.is_mod()) || user_option.as_ref().is_some_and(|x| x.role.is_mod())
{ {
return_collections.push(collection.into()); return_collections.push(collection.into());