Fix formatted team names disconnecting clients via click commands

This commit is contained in:
einfachButzi
2026-11-12 01:58:16 +01:00
parent fb8711f357
commit cd08037752
5 changed files with 22 additions and 8 deletions
+5 -1
View File
@@ -46,6 +46,10 @@ class Team(id: EntityID<Int>) : IntEntity(id) {
fun byId(id: Int) =
synchronized(teamCache) { teamCache.computeIfAbsent(id) { useDb { Team[id] } } }
@JvmStatic
fun getActiveById(id: Int) =
useDb { findById(id)?.takeUnless { it.deleted } }
@JvmStatic
fun get(name: String) =
useDb { find { (TeamTable.name.lowerCase() eq name.lowercase() or (TeamTable.kuerzel.lowerCase() eq name.lowercase())) and not(TeamTable.deleted) }.firstOrNull() }
@@ -100,4 +104,4 @@ class Team(id: EntityID<Int>) : IntEntity(id) {
set(value) = useDb {
name = value
}
}
}