Skip to content

Commit 2abf4b9

Browse files
authored
Merge pull request #64 from topcoder-platform/issues-635
Issues-635: Don't rebuild category tree if category's name is updated
2 parents 5bcb111 + 36f7c9b commit 2abf4b9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/services/vanilla.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,10 @@ async function updateVanillaGroup (challenge) {
321321
if (!groupCategoryForEdit) {
322322
throw new Error('Group category wasn\'t found for this challenge')
323323
}
324+
// Update group's name
324325
groupCategoryForEdit.name = challenge.name
326+
// Delete a category's parent so as not to rebuild the category tree again
327+
delete groupCategoryForEdit.parentCategoryID
325328

326329
const { body: updatedGroupCategory } = await vanillaClient.updateCategory(groupCategoryForEdit.categoryID, groupCategoryForEdit)
327330
logger.info(`The group category was updated: ${JSON.stringify(updatedGroupCategory)}`)

0 commit comments

Comments
 (0)