fix #3681
This commit is contained in:
parent
eaa4ad022b
commit
fb58a97ee4
|
@ -86,7 +86,7 @@ private final class RelaySync(
|
|||
private def updateChapterTags(study: Study, chapter: Chapter, game: RelayGame): Funit = {
|
||||
val gameTags = game.tags.value.foldLeft(Tags(Nil)) {
|
||||
case (newTags, tag) =>
|
||||
if (!chapter.tags.value.exists(equalTags(tag))) newTags + tag
|
||||
if (!chapter.tags.value.exists(tag ==)) newTags + tag
|
||||
else newTags
|
||||
}
|
||||
val tags = game.end
|
||||
|
@ -105,14 +105,6 @@ private final class RelaySync(
|
|||
}.void
|
||||
}
|
||||
|
||||
private def equalTags(t1: Tag)(t2: Tag): Boolean =
|
||||
(t1.name == t2.name) && {
|
||||
t1.value == t2.value || {
|
||||
t1.name == Tag.Result && normalizeDrawNotation(t1) == normalizeDrawNotation(t2)
|
||||
}
|
||||
}
|
||||
private def normalizeDrawNotation(t: Tag): String = t.value.replace("1/2", "½")
|
||||
|
||||
private def createChapter(study: Study, game: RelayGame): Fu[Chapter] =
|
||||
chapterRepo.nextOrderByStudy(study.id) flatMap { order =>
|
||||
val name = {
|
||||
|
|
|
@ -29,7 +29,7 @@ object Dependencies {
|
|||
val hasher = "com.roundeights" %% "hasher" % "1.2.0"
|
||||
val jodaTime = "joda-time" % "joda-time" % "2.9.9"
|
||||
|
||||
val chess = "org.lichess" %% "scalachess" % "6.18"
|
||||
val chess = "org.lichess" %% "scalachess" % "6.20"
|
||||
val maxmind = "com.sanoma.cda" %% "maxmind-geoip2-scala" % "1.2.3-THIB"
|
||||
val prismic = "io.prismic" %% "scala-kit" % "1.2.11-THIB"
|
||||
val java8compat = "org.scala-lang.modules" %% "scala-java8-compat" % "0.8.0"
|
||||
|
|
Loading…
Reference in a new issue