This commit is contained in:
xds
2025-04-07 18:26:23 +03:00
parent a38d5068e0
commit af7577c65b
13 changed files with 229 additions and 62 deletions

View File

@@ -140,7 +140,7 @@ class SpaceService(
launch {
val categories =
categoryService.getCategories(objectId.toString(), null, "name", "ASC").awaitFirstOrNull().orEmpty()
categoryService.getCategories(objectId.toString(), null, "name", "ASC")
categoryRepo.deleteAll(categories).awaitFirstOrNull()
}
@@ -280,7 +280,6 @@ class SpaceService(
val existedTag = findTag(space, tagCode) ?: throw NoSuchElementException("Tag with code $tagCode not found")
val categoriesWithTag =
categoryService.getCategories(space.id!!, sortBy = "name", direction = "ASC", tagCode = existedTag.code)
.awaitSingleOrNull().orEmpty()
categoriesWithTag.map { cat ->
cat.tags.removeIf { it.code == tagCode } // Изменяем список тегов
cat