LinkinStars commented on code in PR #923:
URL: https://github.com/apache/incubator-answer/pull/923#discussion_r1578799424


##########
internal/service/tag_common/tag_common.go:
##########
@@ -844,7 +844,10 @@ func (ts *TagCommonService) UpdateTag(ctx context.Context, 
req *schema.UpdateTag
                return nil
        }
 
-       tagInfo.SlugName = req.SlugName
+       //Adding equivalent slug formatting for tag update
+       slugName := strings.ReplaceAll(req.SlugName, " ", "-")
+       slugName = strings.ToLower(slugName)

Review Comment:
   Put the formatting code at the top. Because there is a check if the same as 
what has already existed before. `tagInfo.SlugName == req.SlugName`
   
   ```go
   //If the content is the same, ignore it
        if tagInfo.OriginalText == req.OriginalText &&
                tagInfo.DisplayName == req.DisplayName &&
                tagInfo.SlugName == req.SlugName {
                return nil
        }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to