Fix EventRelations

Signed-off-by: Chaoscaot <max@maxsp.de>
This commit is contained in:
2025-11-29 18:51:18 +01:00
parent bfc835b0dc
commit 6f4ec64ef7
2 changed files with 1 additions and 5 deletions
@@ -148,7 +148,7 @@ class EventFight(id: EntityID<Int>) : IntEntity(id), Comparable<EventFight> {
set(value) = useDb {
fightStat = value
}
val dependents by lazy { useDb { EventRelation.getFightRelations(this@EventFight) } }
val dependents by lazy { useDb { EventRelation.getFightRelations(this@EventFight).toList() } }
val winner: Team?
get() = if (ergebnis == 1) Team[teamBlue] else if (ergebnis == 2) Team[teamRed] else null
@@ -82,10 +82,6 @@ public class FightStatistics {
Config.EventKampf.setErgebnis(2);
}
// TODO: Fix Transaction context!
if (true) {
return;
}
Config.EventKampf.getDependents().forEach(EventRelation::apply);
Config.EventKampf.getGroup().ifPresent(group -> {