1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-12-25 04:17:59 +01:00

Cherry-picked baa9d10fd2b1e8e07253f4f3576cfb5fff875c44

This commit is contained in:
Heiko Schaefer 2023-06-28 20:48:40 +02:00 committed by Paul Schaub
parent 14d5ab14d2
commit 1c79952150
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
2 changed files with 7 additions and 14 deletions

View file

@ -49,16 +49,9 @@ data class Certification(
this(issuer, target, targetUserId, creationTime, null, true, 120, Depth.limited(0), RegexSet.wildcard())
override fun toString(): String {
val relation = if (userId != null) {
"certifies"
} else {
"delegates to"
}
val relationTarget = if (userId != null) {
"[$userId] ${target.fingerprint}"
} else {
"$target"
}
return "$issuer $relation $relationTarget"
return if (userId != null)
"$issuer certifies [$userId] ${target.fingerprint}"
else
"$issuer delegates to ${target.fingerprint}"
}
}

View file

@ -85,6 +85,6 @@ data class CertificationSet(
}
override fun toString(): String {
return "$certifications"
return certifications.map { it.value }.flatten().joinToString("\n")
}
}