mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-13 06:59:44 +07:00
[fleet] reimplement AiAuthError with the new rhizome api
GitOrigin-RevId: 59b80145b772a76b296367c1dcf50fd9a5ce297b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
15d2581c24
commit
f2b03dbb7e
@@ -70,15 +70,6 @@ fun ChangeScope.cascadeDelete(parent: Entity, child: Entity?) {
|
||||
}
|
||||
}
|
||||
|
||||
fun <T : LegacyEntity> ChangeScope.newOrMutateSingleton(c: KClass<T>, initMutate: T.() -> Unit): T {
|
||||
val res = byEntityType(c)
|
||||
return when {
|
||||
res.isEmpty() -> new(c, defaultPart, initMutate)
|
||||
res.size == 1 -> res.single().apply(initMutate)
|
||||
else -> error("entity of type $c is not single: $res")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
suspend inline fun <reified E : LegacyEntity, R : Any> getOrCreate(property: KMutableProperty1<E, R>,
|
||||
value: R,
|
||||
|
||||
Reference in New Issue
Block a user