mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-07 04:09:15 +02:00
fix:#46 updated fetcher and empty course issue
This commit is contained in:
@@ -89,8 +89,9 @@ func removeDuplicates(groups db.SeminarGroups) db.SeminarGroups {
|
||||
uniqueGroups := make(db.SeminarGroups, 0, len(groups))
|
||||
seen := make(map[string]struct{}) // Use an empty struct to minimize memory usage
|
||||
|
||||
// unique Identifier is the course and semester
|
||||
for _, group := range groups {
|
||||
key := group.Course + group.Semester
|
||||
key := group.UniqueKey()
|
||||
if _, exists := seen[key]; !exists {
|
||||
seen[key] = struct{}{}
|
||||
uniqueGroups = append(uniqueGroups, group)
|
||||
|
Reference in New Issue
Block a user