feat:#104 changed event selection to uuid

This commit is contained in:
masterElmar
2023-12-29 00:05:39 +01:00
parent e29ed1f12f
commit 5128fcbddd
2 changed files with 6 additions and 12 deletions

View File

@@ -125,20 +125,14 @@ func buildIcalQueryForModules(modules []model.FeedCollection) dbx.Expression {
//second check if modules has only one element
if len(modules) == 1 {
return dbx.And(
dbx.HashExp{"Name": modules[0].Name},
dbx.HashExp{"course": modules[0].Course},
)
return dbx.HashExp{"uuid": modules[0].UUID}
}
//third check if modules has more than one element
var wheres []dbx.Expression
for _, module := range modules {
where := dbx.And(
dbx.HashExp{"Name": module.Name},
dbx.HashExp{"course": module.Course},
)
where := dbx.HashExp{"uuid": module.UUID}
wheres = append(wheres, where)
}