Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions server/database/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,8 @@ func DecrementProjectSeenCount(db *mongo.Database, ctx context.Context, project
}

// GetNumProjectsInGroup returns the number of projects in a group
// TODO: Can we pre-aggregate this value?
func GetNumProjectsInGroup(db *mongo.Database, ctx context.Context, group int64) (int64, error) {
return db.Collection("projects").CountDocuments(ctx, gin.H{"group": group})
return db.Collection("projects").CountDocuments(ctx, gin.H{"group": group, "active": true})
}

// GetChallenges gets the list of all challenges from the database
Expand Down